Mercurial > hg > pub > prymula > com
diff lamertetris/Makefile @ 0:2787f5e749ae
INIT
author | prymula <prymula76@outlook.com> |
---|---|
date | Thu, 21 Sep 2023 22:33:57 +0200 |
parents | |
children | b5e2aba31fdb |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lamertetris/Makefile Thu Sep 21 22:33:57 2023 +0200 @@ -0,0 +1,52 @@ +APP_BIN=lamertetris +OBJF = ./sources/field.o \ + ./sources/shape.o \ + ./sources/szlam.o \ + ./sources/text.o \ + ./sources/hiscore.o \ + ./sources/game.o + +prefix = /usr +LIBS=sdl2 SDL2_ttf + +#CXXFLAGS += -I./ -I Sources + +PACKAGES = $(LIBS) +# CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads +CXXFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX +#LDFLAGS += -ldl + +#EXAMPLE_BIN contains list of example binaries to build + +all: $(APP_BIN) + +$(APP_BIN): $(OBJF) + $(CXX) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS) + +clean: + rm -f $(OBJF) $(APP_BIN) + +%.o : %.C + $(CXX) $(CXXFLAGS) -c $< -o $@ + +install: +# mkdir -pm -755 $(prefix) + mkdir -pm 0755 $(prefix)/share/lamertetris + mkdir -pm 0755 $(prefix)/share/lamertetris/img + install -m 0755 lamertetris $(prefix)/bin/lamertetris + install -m 0644 assets/lamertetris.png $(prefix)/share/lamertetris/img/lamertetris.png + install -m 0644 assets/lamertetris.bmp $(prefix)/share/lamertetris/img/lamertetris.bmp + install -m 0644 assets/wallpaper.bmp $(prefix)/share/lamertetris/img/wallpaper.bmp + install -m 0644 LamerTetris.desktop /usr/share/applications + install -m 0644 assets/SpicyRice.ttf $(prefix)/share/lamertetris +.PHONY: install + +uninstall: + rm /usr/bin/lamertetris + rm -r $(prefix)/share/lamertetris + rm /usr/share/applications/LamerTetris.desktop +.PHONY: uninstall + + +# EOF # +