0
|
1 APP_BIN=lamertetris
|
|
2 OBJF = ./sources/field.o \
|
|
3 ./sources/shape.o \
|
|
4 ./sources/szlam.o \
|
|
5 ./sources/text.o \
|
|
6 ./sources/hiscore.o \
|
|
7 ./sources/game.o
|
|
8
|
|
9 prefix = /usr
|
|
10 LIBS=sdl2 SDL2_ttf
|
|
11
|
|
12 #CXXFLAGS += -I./ -I Sources
|
|
13
|
|
14 PACKAGES = $(LIBS)
|
|
15 # CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads
|
|
16 CXXFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX
|
|
17 #LDFLAGS += -ldl
|
|
18
|
|
19 #EXAMPLE_BIN contains list of example binaries to build
|
|
20
|
|
21 all: $(APP_BIN)
|
|
22
|
|
23 $(APP_BIN): $(OBJF)
|
|
24 $(CXX) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS)
|
|
25
|
|
26 clean:
|
|
27 rm -f $(OBJF) $(APP_BIN)
|
|
28
|
|
29 %.o : %.C
|
|
30 $(CXX) $(CXXFLAGS) -c $< -o $@
|
|
31
|
|
32 install:
|
|
33 # mkdir -pm -755 $(prefix)
|
|
34 mkdir -pm 0755 $(prefix)/share/lamertetris
|
|
35 mkdir -pm 0755 $(prefix)/share/lamertetris/img
|
|
36 install -m 0755 lamertetris $(prefix)/bin/lamertetris
|
|
37 install -m 0644 assets/lamertetris.png $(prefix)/share/lamertetris/img/lamertetris.png
|
|
38 install -m 0644 assets/lamertetris.bmp $(prefix)/share/lamertetris/img/lamertetris.bmp
|
|
39 install -m 0644 assets/wallpaper.bmp $(prefix)/share/lamertetris/img/wallpaper.bmp
|
|
40 install -m 0644 LamerTetris.desktop /usr/share/applications
|
|
41 install -m 0644 assets/SpicyRice.ttf $(prefix)/share/lamertetris
|
|
42 .PHONY: install
|
|
43
|
|
44 uninstall:
|
|
45 rm /usr/bin/lamertetris
|
|
46 rm -r $(prefix)/share/lamertetris
|
|
47 rm /usr/share/applications/LamerTetris.desktop
|
|
48 .PHONY: uninstall
|
|
49
|
|
50
|
|
51 # EOF #
|
|
52
|