diff Makefile @ 10:42ac054c0231

*: huge refactoring dirtools now uses wchar (wayyy overdue) the timer doesn't have a stupid design anymore we don't use windows.h at all now ...
author Paper <paper@paper.us.eu.org>
date Sun, 11 Feb 2024 19:43:31 -0500
parents be4835547dd0
children e6a594f16403
line wrap: on
line diff
--- a/Makefile	Fri Dec 16 21:55:37 2022 -0500
+++ b/Makefile	Sun Feb 11 19:43:31 2024 -0500
@@ -8,21 +8,22 @@
 else
 	CFLAGS += -I"/c/Program Files (x86)/Winamp SDK"
 endif
-LDFLAGS=-L"discord_game_sdk/lib/x86" -ldiscord_game_sdk -Wl,--enable-stdcall-fixup
+LDFLAGS=-L"discord_game_sdk/lib/x86" -lshlwapi -lole32 -luuid -ldiscord_game_sdk -Wl,--enable-stdcall-fixup
 DEPS=src/include/config.h src/include/dirtools.h src/include/main.h \
-     src/include/timer.h src/include/resource.h src/include/utils.h
-RC=src/include/dialog.rc
-OBJ=src/config.o src/dirtools.o src/main.o src/timer.o src/utils.o
+     src/include/resource.h src/include/timer.h src/include/utils.h \
+	 src/include/json.h
+OBJ=src/config.o src/dirtools.o src/main.o src/timer.o src/utils.o \
+	src/dialog.o
+.SUFFIXES: .rc
 
-gen_DiscordGameSDK.dll: $(OBJ) src/include/dialog.o
-	gcc -o $@ $(CFLAGS) $^ $(LDFLAGS)
+gen_DiscordGameSDK.dll: $(OBJ) $(DEPS)
+	$(CC) -o $@ $(CFLAGS) $(OBJ) $(LDFLAGS)
 
-src/include/dialog.o: src/include/dialog.rc
-	windres -i $< -o $@
+.rc.o:
+	windres -Isrc/include -i $< -o $@
 
-src/%.o: src/%.c $(DEPS)
-	gcc -c $(CFLAGS) $< -o $@
+.c.o:
+	$(CC) -c $(CFLAGS) $< -o $@
 
 clean:
-	find . -type f -name '*.o' -not -path "./discord_game_sdk/*" -delete
-	find . -type f -name '*.dll' -not -path "./discord_game_sdk/*" -delete
+	rm gen_DiscordGameSDK.dll $(OBJ)