annotate lamertetris/Makefile @ 10:4dc186728822

immposiblerush-0.230919-2
author prymula <prymula76@outlook.com>
date Sun, 04 Feb 2024 23:27:00 +0100
parents 2787f5e749ae
children b5e2aba31fdb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
prymula <prymula76@outlook.com>
parents:
diff changeset
1 APP_BIN=lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
2 OBJF = ./sources/field.o \
prymula <prymula76@outlook.com>
parents:
diff changeset
3 ./sources/shape.o \
prymula <prymula76@outlook.com>
parents:
diff changeset
4 ./sources/szlam.o \
prymula <prymula76@outlook.com>
parents:
diff changeset
5 ./sources/text.o \
prymula <prymula76@outlook.com>
parents:
diff changeset
6 ./sources/hiscore.o \
prymula <prymula76@outlook.com>
parents:
diff changeset
7 ./sources/game.o
prymula <prymula76@outlook.com>
parents:
diff changeset
8
prymula <prymula76@outlook.com>
parents:
diff changeset
9 prefix = /usr
prymula <prymula76@outlook.com>
parents:
diff changeset
10 LIBS=sdl2 SDL2_ttf
prymula <prymula76@outlook.com>
parents:
diff changeset
11
prymula <prymula76@outlook.com>
parents:
diff changeset
12 #CXXFLAGS += -I./ -I Sources
prymula <prymula76@outlook.com>
parents:
diff changeset
13
prymula <prymula76@outlook.com>
parents:
diff changeset
14 PACKAGES = $(LIBS)
prymula <prymula76@outlook.com>
parents:
diff changeset
15 # CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads
prymula <prymula76@outlook.com>
parents:
diff changeset
16 CXXFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX
prymula <prymula76@outlook.com>
parents:
diff changeset
17 #LDFLAGS += -ldl
prymula <prymula76@outlook.com>
parents:
diff changeset
18
prymula <prymula76@outlook.com>
parents:
diff changeset
19 #EXAMPLE_BIN contains list of example binaries to build
prymula <prymula76@outlook.com>
parents:
diff changeset
20
prymula <prymula76@outlook.com>
parents:
diff changeset
21 all: $(APP_BIN)
prymula <prymula76@outlook.com>
parents:
diff changeset
22
prymula <prymula76@outlook.com>
parents:
diff changeset
23 $(APP_BIN): $(OBJF)
prymula <prymula76@outlook.com>
parents:
diff changeset
24 $(CXX) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS)
prymula <prymula76@outlook.com>
parents:
diff changeset
25
prymula <prymula76@outlook.com>
parents:
diff changeset
26 clean:
prymula <prymula76@outlook.com>
parents:
diff changeset
27 rm -f $(OBJF) $(APP_BIN)
prymula <prymula76@outlook.com>
parents:
diff changeset
28
prymula <prymula76@outlook.com>
parents:
diff changeset
29 %.o : %.C
prymula <prymula76@outlook.com>
parents:
diff changeset
30 $(CXX) $(CXXFLAGS) -c $< -o $@
prymula <prymula76@outlook.com>
parents:
diff changeset
31
prymula <prymula76@outlook.com>
parents:
diff changeset
32 install:
prymula <prymula76@outlook.com>
parents:
diff changeset
33 # mkdir -pm -755 $(prefix)
prymula <prymula76@outlook.com>
parents:
diff changeset
34 mkdir -pm 0755 $(prefix)/share/lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
35 mkdir -pm 0755 $(prefix)/share/lamertetris/img
prymula <prymula76@outlook.com>
parents:
diff changeset
36 install -m 0755 lamertetris $(prefix)/bin/lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
37 install -m 0644 assets/lamertetris.png $(prefix)/share/lamertetris/img/lamertetris.png
prymula <prymula76@outlook.com>
parents:
diff changeset
38 install -m 0644 assets/lamertetris.bmp $(prefix)/share/lamertetris/img/lamertetris.bmp
prymula <prymula76@outlook.com>
parents:
diff changeset
39 install -m 0644 assets/wallpaper.bmp $(prefix)/share/lamertetris/img/wallpaper.bmp
prymula <prymula76@outlook.com>
parents:
diff changeset
40 install -m 0644 LamerTetris.desktop /usr/share/applications
prymula <prymula76@outlook.com>
parents:
diff changeset
41 install -m 0644 assets/SpicyRice.ttf $(prefix)/share/lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
42 .PHONY: install
prymula <prymula76@outlook.com>
parents:
diff changeset
43
prymula <prymula76@outlook.com>
parents:
diff changeset
44 uninstall:
prymula <prymula76@outlook.com>
parents:
diff changeset
45 rm /usr/bin/lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
46 rm -r $(prefix)/share/lamertetris
prymula <prymula76@outlook.com>
parents:
diff changeset
47 rm /usr/share/applications/LamerTetris.desktop
prymula <prymula76@outlook.com>
parents:
diff changeset
48 .PHONY: uninstall
prymula <prymula76@outlook.com>
parents:
diff changeset
49
prymula <prymula76@outlook.com>
parents:
diff changeset
50
prymula <prymula76@outlook.com>
parents:
diff changeset
51 # EOF #
prymula <prymula76@outlook.com>
parents:
diff changeset
52