0
|
1 CPP = g++
|
|
2 CC = gcc
|
|
3 # WINDRES = windres.exe
|
|
4 RES =
|
|
5 OBJ = arkanoid.o ball.o $(RES)
|
|
6 LINKOBJ = arkanoid.o ball.o $(RES)
|
|
7 LIBS = `pkg-config --libs sdl2` `pkg-config --libs SDL2_ttf`
|
|
8 INCS = `pkg-config --cflags sdl2`
|
|
9 CXXINCS =
|
|
10 BIN = arkanoid
|
|
11 CXXFLAGS = $(CXXINCS) -g
|
|
12 CFLAGS = $(INCS) -g
|
|
13 RM = rm -f
|
|
14 prefix=/usr
|
|
15
|
|
16 .PHONY: all all-before all-after clean clean-custom
|
|
17
|
|
18 all: all-before arkanoid all-after
|
|
19
|
|
20
|
|
21 clean: clean-custom
|
|
22 ${RM} $(OBJ) $(BIN)
|
|
23
|
|
24 $(BIN): $(OBJ)
|
|
25 $(CC) $(LINKOBJ) -o "arkanoid" $(LIBS)
|
|
26
|
|
27 arkanoid.o: arkanoid.c
|
|
28 $(CC) -c arkanoid.c -o arkanoid.o $(CFLAGS) -DLINUX
|
|
29
|
|
30 ball.o: ball.c
|
|
31 $(CC) -c ball.c -o ball.o $(CFLAGS) -DLINUX
|
|
32
|
|
33 install:
|
|
34 mkdir -pm 0755 $(prefix)/share/arkanoid
|
|
35 install -m 0755 arkanoid $(prefix)/bin
|
|
36 install -m 0644 icon/arkanoid.png $(prefix)/share/pixmaps
|
|
37 install -m 0644 icon/gumka_arkanoid.bmp $(prefix)/share/pixmaps
|
|
38 install -m 0755 arkanoid.desktop /usr/share/applications
|
|
39 # install -m 0644 SpicyRice.ttf $(prefix)/share/fonts/
|
|
40 install -m 0644 SpicyRice.ttf $(prefix)/share/arkanoid
|
|
41 .PHONY: install
|
|
42
|
|
43 uninstall:
|
|
44 rm $(prefix)/bin/arkanoid
|
|
45 rm $(prefix)/share/pixmaps/arkanoid.png
|
|
46 rm $(prefix)/share/pixmaps/gumka_arkanoid.bmp
|
|
47 # rm $(prefix)/share/fonts/SpicyRice.ttf
|
|
48 rm $(prefix)/share/arkanoid/SpicyRice.ttf
|
|
49 rm /usr/share/applications/arkanoid.desktop
|
|
50 rmdir $(prefix)/share/arkanoid
|
|
51 .PHONY: uninstall
|