forked from nemomobile-apps/battlegweled
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
33 lines (22 loc) · 735 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
TARGET = battlegweled
SOURCES = $(wildcard src/*.c)
PIXMAPS = $(wildcard data/pixmaps/*)
PKGS = sdl2 glesv1_cm
CFLAGS += $(shell pkg-config --cflags $(PKGS))
LIBS += $(shell pkg-config --libs $(PKGS))
DESTDIR ?=
PIXMAPSPREFIX ?= /opt/$(TARGET)/pixmaps
CFLAGS += -DPIXMAPSPREFIX=\"$(PIXMAPSPREFIX)/\"
all: $(TARGET)
$(TARGET): $(SOURCES)
$(CC) -o $@ $^ $(LIBS) $(CFLAGS)
install: $(TARGET)
install -d $(DESTDIR)/opt/$(TARGET)
install -m755 $(TARGET) $(DESTDIR)/opt/$(TARGET)
install -d $(DESTDIR)$(PIXMAPSPREFIX)
install -m644 $(PIXMAPS) $(DESTDIR)$(PIXMAPSPREFIX)
install -d $(DESTDIR)/usr/share/applications
install -m644 $(TARGET).desktop $(DESTDIR)/usr/share/applications
clean:
rm -f $(TARGET)
.PHONY: all clean