summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPrzemyslaw <prymula76@outlook.com>2024-04-01 08:55:31 +0200
committerPrzemyslaw <prymula76@outlook.com>2024-04-01 08:55:31 +0200
commit89656e1787faf956c3c122693edc7bb00b1908a3 (patch)
treef5c44a154b7e667343f3be20f41e4282aed1af9b /Makefile
Init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c282727
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+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
+
+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 $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/trix $(DESTDIR)$(PREFIX)/share/trix/img $(DESTDIR)$(PREFIX)/share/trix/img/bg
+ install trix $(DESTDIR)$(PREFIX)/bin
+ install ZapfHumanist.ttf $(DESTDIR)$(PREFIX)/share/trix
+ install img/*.bmp $(DESTDIR)$(PREFIX)/share//trix/img
+ install img/bg/*.txt $(DESTDIR)$(PREFIX)/share/trix/img/bg
+ install img/bg/*.jpeg $(DESTDIR)$(PREFIX)/share/trix/img/bg
+ install img/*.png $(DESTDIR)$(PREFIX)/share/trix/img
+ install Trix.desktop $(DESTDIR)/usr/share/applications
+
+
+uninstall:
+ rm $(PREFIX)/bin/trix
+ rm -r $(PREFIX)/share/trix
+ rm /usr/share/applications/Trix.desktop
+
+
+
+# EOF #
+