Mercurial > hg > pub > prymula > com
annotate lamertetris/Makefile.aur @ 24:c7e131ce2f14
makefile rm
author | Przemyslaw <prymula76@outlook.com> |
---|---|
date | Mon, 01 Apr 2024 07:16:40 +0200 |
parents | b5e2aba31fdb |
children |
rev | line source |
---|---|
18
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
1 APP_BIN=lamertetris |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
2 OBJF = ./sources/field.o \ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
3 ./sources/shape.o \ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
4 ./sources/szlam.o \ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
5 ./sources/text.o \ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
6 ./sources/hiscore.o \ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
7 ./sources/game.o |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
8 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
9 prefix = /usr |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
10 LIBS=sdl2 SDL2_ttf |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
11 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
12 #CXXFLAGS += -I./ -I Sources |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
13 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
14 PACKAGES = $(LIBS) |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
15 # CXXFLAGS += `pkg-config --cflags $(PACKAGES)` -mthreads |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
16 CXXFLAGS += -g -Wall `pkg-config --cflags $(PACKAGES)` -DLINUX |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
17 #LDFLAGS += -ldl |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
18 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
19 #EXAMPLE_BIN contains list of example binaries to build |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
20 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
21 all: $(APP_BIN) |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
22 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
23 $(APP_BIN): $(OBJF) |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
24 $(CXX) $(CXXFLAGS) $(OBJF) -o $(APP_BIN) `pkg-config --libs $(PACKAGES)` -g $(EXTRA_LIBS) |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
25 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
26 clean: |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
27 rm -f $(OBJF) $(APP_BIN) |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
28 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
29 %.o : %.C |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
30 $(CXX) $(CXXFLAGS) -c $< -o $@ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
31 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
32 install: |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
33 mkdir -pm 0755 $(DESTDIR)$(prefix)/bin |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
34 mkdir -pm 0755 $(DESTDIR)$(prefix)/share/applications |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
35 mkdir -pm 0755 $(DESTDIR)$(prefix)/share/lamertetris |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
36 mkdir -pm 0755 $(DESTDIR)$(prefix)/share/lamertetris/img |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
37 install -m 0755 lamertetris $(DESTDIR)$(prefix)/bin/ |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
38 install -m 0644 assets/lamertetris.png $(DESTDIR)$(prefix)/share/lamertetris/img/lamertetris.png |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
39 install -m 0644 assets/lamertetris.bmp $(DESTDIR)$(prefix)/share/lamertetris/img/lamertetris.bmp |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
40 install -m 0644 assets/wallpaper.bmp $(DESTDIR)$(prefix)/share/lamertetris/img/wallpaper.bmp |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
41 install -m 0644 LamerTetris.desktop $(DESTDIR)$(prefix)/share/applications |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
42 install -m 0644 assets/SpicyRice.ttf $(DESTDIR)$(prefix)/share/lamertetris |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
43 .PHONY: install |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
44 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
45 # |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
46 #uninstall: |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
47 # rm /usr/bin/lamertetris |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
48 # rm -r $(prefix)/share/lamertetris |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
49 # rm /usr/share/applications/LamerTetris.desktop |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
50 #.PHONY: uninstall |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
51 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
52 |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
53 # EOF # |
b5e2aba31fdb
lamertetris-0.230821-3 package for arch
Przemyslaw <prymula76@outlook.com>
parents:
diff
changeset
|
54 |