summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2013-07-29 18:40:02 +0200
committerDaniel Carl <danielcarl@gmx.de>2013-07-29 18:40:02 +0200
commit7cb30f376c8b6bccf99e504f591f5fca7b9b433b (patch)
tree520f76b638df3c0e703f3329b8db91ecc027033b /Makefile
parentf72f42f6ae112202dfd95090bfdf4f3900e290fd (diff)
Put similar target in Makefile together.
Added LDFLAG -s to strip symbol table to build smaller binary.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 484a85e..0a9ca1a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ include config.mk
-include $(DEPS)
all: $(TARGET)
+debug: $(DTARGET)
options:
@echo "$(PROJECT) build options:"
@@ -12,16 +13,23 @@ options:
@echo "CC = $(CC)"
src/hints.o: src/hints.js.h
+src/hints.do: src/hints.js.h
+
src/hints.js.h: src/hints.js
@echo "minify $<"
@cat $< | src/js2h.sh > $@
$(OBJ): src/config.h config.mk
+$(DOBJ): src/config.h config.mk
$(TARGET): $(OBJ)
@echo "$(CC) $@"
@$(CC) $(OBJ) -o $(TARGET) $(LDFLAGS)
+$(DTARGET): $(DOBJ)
+ @echo "$(CC) $@"
+ @$(CC) $(DFLAGS) $(DOBJ) -o $(DTARGET) $(DLDFLAGS)
+
src/config.h:
@echo create $@ from src/config.def.h
@cp src/config.def.h $@
@@ -30,12 +38,6 @@ src/config.h:
@echo "${CC} $<"
@$(CC) -c -o $@ $< $(CFLAGS)
-debug: $(DTARGET)
-
-$(DTARGET): $(DOBJ)
- @echo "$(CC) $@"
- @$(CC) $(DFLAGS) $(DOBJ) -o $(DTARGET) $(LDFLAGS)
-
%.do: %.c %.h
@echo "${CC} $<"
@$(CC) -c -o $@ $< $(DFLAGS)