diff arkanoid/Makefile.win @ 0:2787f5e749ae

INIT
author prymula <prymula76@outlook.com>
date Thu, 21 Sep 2023 22:33:57 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/arkanoid/Makefile.win	Thu Sep 21 22:33:57 2023 +0200
@@ -0,0 +1,44 @@
+CPP  = g++.exe
+CC   = gcc.exe
+
+WINDRES = windres.exe
+RES  = 
+OBJ  =  arkanoid.o ball.o $(RES)
+LINKOBJ  = arkanoid.o ball.o $(RES)
+#LIBS =  -L"/lib" -lsdl -lsdl_ttf -mwindows
+LIBS =  -L"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\pietraszczyk\lib" -mwindows -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf -static-libgcc
+#LIBS = -L"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\pietraszczyk\lib" -Wl,-Bstatic -l:libSDL2_ttf.a  -l:libfreetype.a  -l:libz.a -l:libSDL2main.a -l:libSDL2.a -Wl,-Bdynamic
+# # `pkg-config brotlidec --libs` `pkg-config brotlicommon --libs`
+#LIBS = -mwindows -Wl,-Bstatic -l:libmingw32.a -l:libgcc.a -l:libgcc_eh.a `sdl2-config --static-libs` `pkg-config sdl2_ttf --static --libs` `pkg-config freetype2 --static --libs` `pkg-config libpng16 --static --libs` `pkg-config zlib --static --libs` `pkg-config libpng --static --libs` `pkg-config harfbuzz --static --libs` `pkg-config graphite2 --static --libs` -l:libstdc++.a -Wl,-Bdynamic
+INCS = `sdl2-config --cflags`
+INCS = -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\pietraszczyk\include" -Dmain=SDL_main
+CXXINCS =
+BIN  = arkanoid.exe
+CXXFLAGS = $(CXXINCS)
+CFLAGS = $(INCS) -g 
+RM = rm
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before arkanoid.exe all-after
+#all: arkanoid.res arkanoid.exe 
+
+
+clean: clean-custom
+	${RM} $(OBJ)
+	${RM} $(BIN)
+
+#arkanoid.res: arkanoid.rc
+#	$(WINDRES)  arkanoid.rc arkanoid.res
+
+
+$(BIN): $(OBJ)
+	$(WINDRES) arkanoid.rc -O coff -o icon.o
+	$(CC) $(LINKOBJ) -o "arkanoid.exe" $(LIBS) icon.o
+#	$(CC) $(LINKOBJ) -o "arkanoid.exe" $(LIBS)
+
+arkanoid.o: arkanoid.c
+	$(CC) -c arkanoid.c -o arkanoid.o $(CFLAGS) -DWINDOWS -DNO_STDIO_REDIRECT
+
+ball.o: ball.c
+	$(CC) -c ball.c -o ball.o $(CFLAGS) -DNO_STDIO_REDIRECT