summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 24 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index bfea658..f691de1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,28 @@
-CFLAGS=-O -g -lX11 -Wall -Werror
+CFLAGS=-O2 -g -lX11 -Wall -Werror
+LDFLAGS=-lXft -lfontconfig
+
+BIN=cmdtree
+
+OBJS += drw.o
+OBJS += util.o
+OBJS += cmdtree.o
+
+SRCS=$(OBJS:.o=.c)
+
+all: $(SHLIB) $(STATICLIB) $(BIN)
+
+include $(OBJS:.o=.d)
+
+%.d: %.c
+ $(CC) -MM $(CFLAGS) $< > $@
all: cmdtree
-cmdtree: cmdtree.c
- $(CC) $(CFLAGS) $< -o $@
+$(BIN): $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
+
+clean: fake
+ rm -f $(OBJS) $(BIN)
+
+.PHONY: fake