diff arkanoid/Makefile @ 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	Thu Sep 21 22:33:57 2023 +0200
@@ -0,0 +1,51 @@
+CPP  = g++
+CC   = gcc
+# WINDRES = windres.exe
+RES  =
+OBJ  = arkanoid.o ball.o $(RES)
+LINKOBJ  = arkanoid.o ball.o $(RES)
+LIBS = `pkg-config --libs sdl2` `pkg-config --libs SDL2_ttf`
+INCS = `pkg-config --cflags sdl2`
+CXXINCS =
+BIN  = arkanoid
+CXXFLAGS = $(CXXINCS)   -g
+CFLAGS = $(INCS)   -g
+RM = rm -f
+prefix=/usr
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before arkanoid all-after
+
+
+clean: clean-custom
+	${RM} $(OBJ) $(BIN)
+
+$(BIN): $(OBJ)
+	$(CC) $(LINKOBJ) -o "arkanoid" $(LIBS)
+
+arkanoid.o: arkanoid.c
+	$(CC) -c arkanoid.c -o arkanoid.o $(CFLAGS) -DLINUX
+
+ball.o: ball.c
+	$(CC) -c ball.c -o ball.o $(CFLAGS) -DLINUX
+
+install:
+	mkdir -pm 0755 $(prefix)/share/arkanoid
+	install -m 0755 arkanoid $(prefix)/bin
+	install -m 0644 icon/arkanoid.png $(prefix)/share/pixmaps
+	install -m 0644 icon/gumka_arkanoid.bmp $(prefix)/share/pixmaps
+	install -m 0755 arkanoid.desktop /usr/share/applications
+#	install -m 0644 SpicyRice.ttf $(prefix)/share/fonts/
+	install -m 0644 SpicyRice.ttf $(prefix)/share/arkanoid
+.PHONY: install
+
+uninstall:
+	rm $(prefix)/bin/arkanoid
+	rm $(prefix)/share/pixmaps/arkanoid.png
+	rm $(prefix)/share/pixmaps/gumka_arkanoid.bmp
+#	rm $(prefix)/share/fonts/SpicyRice.ttf
+	rm $(prefix)/share/arkanoid/SpicyRice.ttf
+	rm /usr/share/applications/arkanoid.desktop
+	rmdir $(prefix)/share/arkanoid
+.PHONY: uninstall