diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-01 01:03:42 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-01 01:03:42 +0200 |
commit | 481316f44fed66f2b3a425396bad4f931a8fc413 (patch) | |
tree | b540787a54521e7abee4d0250c2ee2847f4b1dbe | |
parent | a1f686d1b4f74d414ca0909b2af73bb10e0ec597 (diff) | |
download | EpisodeBrowser-481316f44fed66f2b3a425396bad4f931a8fc413.tar.gz |
Rework build system.
The Makefile was originally written for Eclipse, but I no longer use
Eclipse.
-rw-r--r-- | Build.bat | 4 | ||||
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | Run.bat | 9 |
3 files changed, 20 insertions, 16 deletions
@@ -1,2 +1,2 @@ -@cd %~dp0\build\default -@make -f ../../Makefile || pause
\ No newline at end of file +@cd %~dp0 +@make || pause @@ -1,8 +1,8 @@ -R = ../../ +B = build/default/ -C = $(R)c/main.c -PL = $(R)pl/track_episodes.pl $(R)pl/local_episodes.pl $(R)pl/episode_data.pl -OBJ = common.obj datalistview.obj episodelistview.obj listview.obj resource.obj +C = c/main.c +PL = pl/track_episodes.pl pl/local_episodes.pl pl/episode_data.pl +OBJ = $(B)common.obj $(B)datalistview.obj $(B)episodelistview.obj $(B)listview.obj $(B)resource.obj CC = swipl-ld CFLAGS += -DUNICODE -D_UNICODE @@ -14,16 +14,19 @@ else CFLAGS += -O -ld-options,-mwindows endif -all: EpisodeBrowser.exe +all: $(B)EpisodeBrowser.exe -EpisodeBrowser.exe: $(C) $(OBJ) $(PL) $(R)c/defs.h $(R)Makefile +$(B)EpisodeBrowser.exe: $(C) $(OBJ) $(PL) c/defs.h Makefile $(CC) -v $(CFLAGS) $(LDFLAGS) -goal true -o $@ $(C) $(OBJ) $(PL) -resource.obj: $(R)c/resource.h $(R)c/resource.rc - windres -i $(R)c/resource.rc -o resource.obj +$(B)resource.obj: c/resource.h c/resource.rc + windres -i c/resource.rc -o $(B)resource.obj -%.obj: $(R)c/%.c $(R)c/defs.h +$(B)%.obj: c/%.c c/defs.h $(CC) -c $(CFLAGS) -o $@ $< +TAGS: c/*.c c/*.h + etags $^ + clean: - rm -fr EpisodeBrowser.exe *.obj + rm -fr $(B)EpisodeBrowser.exe $(B)*.obj @@ -1,4 +1,5 @@ -@cd %~dp0\build\default -@make -f ../../Makefile || pause && exit -@cd %TEMP% -@%~dp0\build\default\EpisodeBrowser.exe
\ No newline at end of file +@cd %~dp0 +@make || pause && exit +@pushd %TEMP% +@%~dp0\build\default\EpisodeBrowser.exe +@popd |