summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-12-28 12:47:47 -0800
committerlouie <lshprung@yahoo.com>2020-12-28 12:47:47 -0800
commitd7fa91b54c7dcce8dedbe32f37cf849f530f8864 (patch)
treec22df16697dc92aaed450412e11697eb13a62858 /Makefile
parentcf54938e343a9fced866fd2f2602eb807b7b8a93 (diff)
Cleaned up ifdefs
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3ce8010..ad0bdab 100644
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,33 @@ NAME = tml
LIBS = -lncurses
PREFIX = /usr/local
-$(NAME): draw.o read_cfg.o group.o entry.o
- $(CC) -o $(NAME) draw.o read_cfg.o group.o entry.o $(LIBS)
-draw.o: draw.c read_cfg.h group.h entry.h
-read_cfg.o: read_cfg.c group.o entry.o
+ifeq ($(OS),Windows_NT)
+
+$(NAME): draw.o read_cfg.o group.o entry.o windows/draw.o windows/read_cfg.o
+ $(CC) -o $(NAME) draw.o read_cfg.o group.o entry.o windows/draw.o windows/read_cfg.o $(LIBS)
+
+draw.o: draw.c read_cfg.h group.h entry.h windows/draw.h windows/read_cfg.h
+windows/draw.o: windows/draw.c windows/draw.h draw.h
+read_cfg.o: read_cfg.c group.o entry.o windows/read_cfg.h
+windows/read_cfg.o: windows/read_cfg.c windows/read_cfg.h read_cfg.h
+
+else
+
+$(NAME): draw.o read_cfg.o group.o entry.o unix/draw.o unix/read_cfg.o
+ $(CC) -o $(NAME) draw.o read_cfg.o group.o entry.o unix/draw.o unix/read_cfg.o $(LIBS)
+
+draw.o: draw.c read_cfg.h group.h entry.h unix/draw.h unix/read_cfg.h
+unix/draw.o: unix/draw.c unix/draw.h draw.h
+read_cfg.o: read_cfg.c group.o entry.o unix/read_cfg.h
+windows/read_cfg.o: unix/read_cfg.c unix/read_cfg.h read_cfg.h
+
+endif
+
group.o: group.c group.h entry.h
entry.o: entry.c entry.h read_cfg.h group.h
+
.PHONY: clean
clean:
rm *.o $(NAME)