0
|
1 APP_BIN=trix
|
|
2 OBJF = ./src/main.o \
|
|
3 ./src/menu.o \
|
|
4 ./src/game.o
|
|
5
|
|
6
|
|
7 LIBS=sdl2 SDL2_ttf SDL2_image
|
|
8
|
|
9 #CXXFLAGS += -I./ -I Sources
|
|
10
|
|
11 PACKAGES = $(LIBS)
|
|
12 # CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads
|
|
13 CFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX
|
|
14 #LDFLAGS += -ldl
|
|
15 PREFIX = /usr
|
|
16
|
|
17 all: $(APP_BIN)
|
|
18
|
|
19 $(APP_BIN): $(OBJF)
|
|
20 $(CC) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS)
|
|
21
|
|
22 clean:
|
|
23 rm -f $(OBJF) $(APP_BIN)
|
|
24
|
|
25 %.o : %.C
|
|
26 $(CC) $(CFLAGS) -c $< -o $@
|
|
27
|
|
28 install:
|
21
|
29 install -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/trix $(DESTDIR)$(PREFIX)/share/trix/img $(DESTDIR)$(PREFIX)/share/trix/img/bg
|
|
30 install trix $(DESTDIR)$(PREFIX)/bin
|
|
31 install ZapfHumanist.ttf $(DESTDIR)$(PREFIX)/share/trix
|
|
32 install img/*.bmp $(DESTDIR)$(PREFIX)/share//trix/img
|
|
33 install img/bg/*.txt $(DESTDIR)$(PREFIX)/share/trix/img/bg
|
|
34 install img/bg/*.jpeg $(DESTDIR)$(PREFIX)/share/trix/img/bg
|
|
35 install img/*.png $(DESTDIR)$(PREFIX)/share/trix/img
|
|
36 install Trix.desktop $(DESTDIR)/usr/share/applications
|
0
|
37
|
|
38
|
|
39 uninstall:
|
|
40 rm $(PREFIX)/bin/trix
|
|
41 rm -r $(PREFIX)/share/trix
|
|
42 rm /usr/share/applications/Trix.desktop
|
|
43
|
|
44
|
|
45
|
|
46 # EOF #
|
|
47
|