-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.14 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.14 KB
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
33
34
35
36
37
38
39
#----------------------------------------------
#
# Makefile pro ff-clone
#
#-----------------------------------------------
BINDIR = /usr/local/bin
DATADIR = /usr/local/share/ff-clone
#-----------------------------------------------
CC = gcc
INCLUDE = -I. $(shell pkg-config --cflags lua 2>/dev/null || pkg-config --cflags lua5.2 2>/dev/null || echo "")
OBJ = main.o loop.o warning.o window.o X.o draw.o gener.o layers.o script.o levelscript.o object.o rules.o moves.o gmoves.o keyboard.o imgsave.o directories.o menudraw.o menuevents.o menuscript.o gsaves.o infowindow.o
LIB = -lX11 -lcairo $(shell pkg-config --libs lua 2>/dev/null || pkg-config --libs lua5.2 2>/dev/null || echo -llua) $(LDFLAGS) -lm
PROGNAME = ff-clone
all: $(PROGNAME)
directories.o: directories.c
$(CC) $(INCLUDE) -g -Wall -c -o directories.o directories.c -DDATADIR="\"$(DATADIR)\""
.c.o:
$(CC) $(INCLUDE) -g -Wall -c -o $*.o $<
$(PROGNAME): $(OBJ)
$(CC) $(INCLUDE) $(OBJ) $(LIB) -o $@
clean:
rm -rf *.o $(PROGNAME)
install: $(PROGNAME)
install -s $(PROGNAME) $(BINDIR)/
mkdir -p $(DATADIR)
cp -r data/* $(DATADIR)/
uninstall:
rm $(BINDIR)/$(PROGNAME)
rm -r $(DATADIR)