view lamertetris/Makefile.aur @ 18:b5e2aba31fdb

lamertetris-0.230821-3 package for arch
author Przemyslaw <prymula76@outlook.com>
date Sun, 31 Mar 2024 15:35:26 +0200
parents
children
line wrap: on
line source

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 0755 $(DESTDIR)$(prefix)/bin
	mkdir -pm 0755 $(DESTDIR)$(prefix)/share/applications
	mkdir -pm 0755 $(DESTDIR)$(prefix)/share/lamertetris
	mkdir -pm 0755 $(DESTDIR)$(prefix)/share/lamertetris/img
	install -m 0755 lamertetris $(DESTDIR)$(prefix)/bin/
	install -m 0644 assets/lamertetris.png $(DESTDIR)$(prefix)/share/lamertetris/img/lamertetris.png
	install -m 0644 assets/lamertetris.bmp $(DESTDIR)$(prefix)/share/lamertetris/img/lamertetris.bmp
	install -m 0644 assets/wallpaper.bmp $(DESTDIR)$(prefix)/share/lamertetris/img/wallpaper.bmp
	install -m 0644 LamerTetris.desktop $(DESTDIR)$(prefix)/share/applications
	install -m 0644 assets/SpicyRice.ttf $(DESTDIR)$(prefix)/share/lamertetris
.PHONY: install

#
#uninstall:
#	rm /usr/bin/lamertetris
#	rm -r $(prefix)/share/lamertetris
#	rm /usr/share/applications/LamerTetris.desktop
#.PHONY: uninstall


# EOF #