view lamertetris/Makefile @ 13:fa0307eb70b7

immposiblerush-typo correction
author prymula <prymula76@outlook.com>
date Fri, 09 Feb 2024 16:40:54 +0100
parents 2787f5e749ae
children b5e2aba31fdb
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 -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 #