diff trix/Makefile @ 0:2787f5e749ae

INIT
author prymula <prymula76@outlook.com>
date Thu, 21 Sep 2023 22:33:57 +0200
parents
children bef3b1af6326
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trix/Makefile	Thu Sep 21 22:33:57 2023 +0200
@@ -0,0 +1,48 @@
+APP_BIN=trix
+OBJF = ./src/main.o \
+	./src/menu.o \
+	./src/game.o
+
+
+LIBS=sdl2 SDL2_ttf SDL2_image
+
+#CXXFLAGS += -I./ -I Sources
+
+PACKAGES = $(LIBS)
+# CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads
+CFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX
+#LDFLAGS += -ldl
+PREFIX = /usr
+#EXAMPLE_BIN contains list of example binaries to build
+
+all: $(APP_BIN)
+
+$(APP_BIN): $(OBJF)
+	$(CC) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS)
+
+clean:
+	rm -f $(OBJF) $(APP_BIN)
+
+%.o : %.C
+	$(CC) $(CFLAGS) -c $< -o $@
+
+install:
+	install -d $(PREFIX)/share/trix $(PREFIX)/share/trix/img $(PREFIX)/share/trix/img/bg
+	install trix $(PREFIX)/bin
+	install ZapfHumanist.ttf $(PREFIX)/share/trix
+	install img/*.bmp $(PREFIX)/share//trix/img
+	install img/bg/*.txt $(PREFIX)/share/trix/img/bg
+	install img/bg/*.jpeg $(PREFIX)/share/trix/img/bg
+	install img/*.png $(PREFIX)/share/trix/img
+	install Trix.desktop /usr/share/applications
+
+
+uninstall:
+	rm $(PREFIX)/bin/trix
+	rm -r $(PREFIX)/share/trix
+	rm /usr/share/applications/Trix.desktop
+	
+
+
+# EOF #
+