aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 8a50d02..505b8f1 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,8 @@ CFLAGS += -Wall -Wpedantic -O -cc-options,-std=c++17 -ld-options,-mwindows
CFLAGS += -DUNICODE -D_UNICODE
LDFLAGS += -lcomctl32 -luxtheme
-all: b/$(EXE)
- cp $< "C:\Users\John\Desktop\Delat"
+all: showdeps b/$(EXE)
+ cp b/$(EXE) "C:\Users\John\Desktop\Delat"
clean:
rm -fr b/$(EXE) b/*.obj
@@ -16,10 +16,7 @@ clean:
TAGS: c/*.cpp c/*.h pl/*.pl
etags c/*.cpp c/*.h -lprolog pl/*.pl
-deps.mk: c/*.cpp
- perl makedeps
-
-b/$(EXE): Makefile deps.mk c/main.cpp $(OBJ) $(PL)
+b/$(EXE): Makefile c/main.cpp $(OBJ) $(PL)
$(CC) -v $(CFLAGS) $(LDFLAGS) -goal true -o $@ c/main.cpp $(OBJ) $(PL)
b/resource.obj: c/resource.h c/resource.rc c/application.manifest
@@ -28,6 +25,16 @@ b/resource.obj: c/resource.h c/resource.rc c/application.manifest
b/%.obj: c/%.cpp
$(CC) -c $(CFLAGS) -o $@ $<
+# showdeps prints a short summary of which dependencies have changed,
+# causing which targets to be rebuilt. It is run by the `all' target
+# by default.
+.PHONY: showdeps
+showdeps:
+ @perl showdeps
+
# deps.mk includes additional, dynamically generated dependencies for
-# b/*.obj and b/EpisodeBrowser.exe.
+# b/*.obj and b/EpisodeBrowser.exe. Because it is included below, GNU
+# make should build deps.mk automatically.
+deps.mk: c/*.cpp
+ perl makedeps
-include deps.mk