diff Makefile @ 6:d1e5b8390cd3

Add Windows GUI version and a multitude of other changes
author Paper <mrpapersonic@gmail.com>
date Wed, 26 Jan 2022 20:25:08 -0500
parents 87c7d43b03ff
children 7103ac60ebdc
line wrap: on
line diff
--- a/Makefile	Fri Jan 21 01:53:58 2022 -0500
+++ b/Makefile	Wed Jan 26 20:25:08 2022 -0500
@@ -1,13 +1,16 @@
-CC=clang  # clang cause gcc throws compiling errors that i don't know how to fix
-CC_FLAGS=-Wall -static -O2
-LD_FLAGS=-ffunction-sections
+CC=clang
+CC_FLAGS=-Wall -O2
+LD_FLAGS=
 
-%.o : %.c
+src/%.o : src/%.c
 	$(CC) -c $(CC_FLAGS) $< -o $@
 
-msvpvf: msvpvf.o
+msvpvf: src/main.o
 	$(CC) -o $@ $< $(CC_FLAGS) $(LD_FLAGS)
 
+# GUI is windows-only, please use cross-compiler!
+gui: src/gui.o
+	$(CC) -o $@ $< $(CC_FLAGS) $(LD_FLAGS) -mwindows
+
 clean:
-	rm -f *.o
-	rm -f msvpvf msvpvf.exe
+	rm -f src/*.o *.exe msvpvf gui