aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-15 16:57:15 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-15 16:57:15 +0200
commitd00f8b35b4838ba7c6bf00b7b211f463810f4ae5 (patch)
treeee9d04eb06d2871d75b72cd7b7705ef061eaaede /Makefile
parentf61e83d936ebab185b09682f922aa58734153761 (diff)
downloadEpisodeBrowser-d00f8b35b4838ba7c6bf00b7b211f463810f4ae5.tar.gz
Improve makedeps script.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index df0a190..8a50d02 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,26 @@
-C = c/main.cpp
-PL = pl/cfg.pl pl/episode_data.pl pl/local_episodes.pl pl/track_episodes.pl
+EXE = EpisodeBrowser.exe
OBJ = b/common.obj b/datalistview.obj b/episodelistview.obj b/listview.obj b/pl.obj b/resource.obj
+PL = pl/cfg.pl pl/episode_data.pl pl/local_episodes.pl pl/track_episodes.pl
CC = swipl-ld
CFLAGS += -Wall -Wpedantic -O -cc-options,-std=c++17 -ld-options,-mwindows
CFLAGS += -DUNICODE -D_UNICODE
LDFLAGS += -lcomctl32 -luxtheme
-all: b/EpisodeBrowser.exe
+all: b/$(EXE)
cp $< "C:\Users\John\Desktop\Delat"
clean:
- rm -fr b/EpisodeBrowser.exe b/*.obj
+ rm -fr b/$(EXE) b/*.obj
TAGS: c/*.cpp c/*.h pl/*.pl
etags c/*.cpp c/*.h -lprolog pl/*.pl
deps.mk: c/*.cpp
- perl makedeps.pl
+ perl makedeps
-b/EpisodeBrowser.exe: Makefile deps.mk $(C) $(OBJ) $(PL) c/*.h
- $(CC) -v $(CFLAGS) $(LDFLAGS) -goal true -o $@ $(C) $(OBJ) $(PL)
+b/$(EXE): Makefile deps.mk 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
windres -i c/resource.rc -o b/resource.obj
@@ -28,4 +28,6 @@ b/resource.obj: c/resource.h c/resource.rc c/application.manifest
b/%.obj: c/%.cpp
$(CC) -c $(CFLAGS) -o $@ $<
+# deps.mk includes additional, dynamically generated dependencies for
+# b/*.obj and b/EpisodeBrowser.exe.
-include deps.mk