annotate arkanoid/Makefile @ 18:b5e2aba31fdb

lamertetris-0.230821-3 package for arch
author Przemyslaw <prymula76@outlook.com>
date Sun, 31 Mar 2024 15:35:26 +0200
parents 2787f5e749ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
prymula <prymula76@outlook.com>
parents:
diff changeset
1 CPP = g++
prymula <prymula76@outlook.com>
parents:
diff changeset
2 CC = gcc
prymula <prymula76@outlook.com>
parents:
diff changeset
3 # WINDRES = windres.exe
prymula <prymula76@outlook.com>
parents:
diff changeset
4 RES =
prymula <prymula76@outlook.com>
parents:
diff changeset
5 OBJ = arkanoid.o ball.o $(RES)
prymula <prymula76@outlook.com>
parents:
diff changeset
6 LINKOBJ = arkanoid.o ball.o $(RES)
prymula <prymula76@outlook.com>
parents:
diff changeset
7 LIBS = `pkg-config --libs sdl2` `pkg-config --libs SDL2_ttf`
prymula <prymula76@outlook.com>
parents:
diff changeset
8 INCS = `pkg-config --cflags sdl2`
prymula <prymula76@outlook.com>
parents:
diff changeset
9 CXXINCS =
prymula <prymula76@outlook.com>
parents:
diff changeset
10 BIN = arkanoid
prymula <prymula76@outlook.com>
parents:
diff changeset
11 CXXFLAGS = $(CXXINCS) -g
prymula <prymula76@outlook.com>
parents:
diff changeset
12 CFLAGS = $(INCS) -g
prymula <prymula76@outlook.com>
parents:
diff changeset
13 RM = rm -f
prymula <prymula76@outlook.com>
parents:
diff changeset
14 prefix=/usr
prymula <prymula76@outlook.com>
parents:
diff changeset
15
prymula <prymula76@outlook.com>
parents:
diff changeset
16 .PHONY: all all-before all-after clean clean-custom
prymula <prymula76@outlook.com>
parents:
diff changeset
17
prymula <prymula76@outlook.com>
parents:
diff changeset
18 all: all-before arkanoid all-after
prymula <prymula76@outlook.com>
parents:
diff changeset
19
prymula <prymula76@outlook.com>
parents:
diff changeset
20
prymula <prymula76@outlook.com>
parents:
diff changeset
21 clean: clean-custom
prymula <prymula76@outlook.com>
parents:
diff changeset
22 ${RM} $(OBJ) $(BIN)
prymula <prymula76@outlook.com>
parents:
diff changeset
23
prymula <prymula76@outlook.com>
parents:
diff changeset
24 $(BIN): $(OBJ)
prymula <prymula76@outlook.com>
parents:
diff changeset
25 $(CC) $(LINKOBJ) -o "arkanoid" $(LIBS)
prymula <prymula76@outlook.com>
parents:
diff changeset
26
prymula <prymula76@outlook.com>
parents:
diff changeset
27 arkanoid.o: arkanoid.c
prymula <prymula76@outlook.com>
parents:
diff changeset
28 $(CC) -c arkanoid.c -o arkanoid.o $(CFLAGS) -DLINUX
prymula <prymula76@outlook.com>
parents:
diff changeset
29
prymula <prymula76@outlook.com>
parents:
diff changeset
30 ball.o: ball.c
prymula <prymula76@outlook.com>
parents:
diff changeset
31 $(CC) -c ball.c -o ball.o $(CFLAGS) -DLINUX
prymula <prymula76@outlook.com>
parents:
diff changeset
32
prymula <prymula76@outlook.com>
parents:
diff changeset
33 install:
prymula <prymula76@outlook.com>
parents:
diff changeset
34 mkdir -pm 0755 $(prefix)/share/arkanoid
prymula <prymula76@outlook.com>
parents:
diff changeset
35 install -m 0755 arkanoid $(prefix)/bin
prymula <prymula76@outlook.com>
parents:
diff changeset
36 install -m 0644 icon/arkanoid.png $(prefix)/share/pixmaps
prymula <prymula76@outlook.com>
parents:
diff changeset
37 install -m 0644 icon/gumka_arkanoid.bmp $(prefix)/share/pixmaps
prymula <prymula76@outlook.com>
parents:
diff changeset
38 install -m 0755 arkanoid.desktop /usr/share/applications
prymula <prymula76@outlook.com>
parents:
diff changeset
39 # install -m 0644 SpicyRice.ttf $(prefix)/share/fonts/
prymula <prymula76@outlook.com>
parents:
diff changeset
40 install -m 0644 SpicyRice.ttf $(prefix)/share/arkanoid
prymula <prymula76@outlook.com>
parents:
diff changeset
41 .PHONY: install
prymula <prymula76@outlook.com>
parents:
diff changeset
42
prymula <prymula76@outlook.com>
parents:
diff changeset
43 uninstall:
prymula <prymula76@outlook.com>
parents:
diff changeset
44 rm $(prefix)/bin/arkanoid
prymula <prymula76@outlook.com>
parents:
diff changeset
45 rm $(prefix)/share/pixmaps/arkanoid.png
prymula <prymula76@outlook.com>
parents:
diff changeset
46 rm $(prefix)/share/pixmaps/gumka_arkanoid.bmp
prymula <prymula76@outlook.com>
parents:
diff changeset
47 # rm $(prefix)/share/fonts/SpicyRice.ttf
prymula <prymula76@outlook.com>
parents:
diff changeset
48 rm $(prefix)/share/arkanoid/SpicyRice.ttf
prymula <prymula76@outlook.com>
parents:
diff changeset
49 rm /usr/share/applications/arkanoid.desktop
prymula <prymula76@outlook.com>
parents:
diff changeset
50 rmdir $(prefix)/share/arkanoid
prymula <prymula76@outlook.com>
parents:
diff changeset
51 .PHONY: uninstall