aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
blob: b82ee17d9a214997035094b4044c41170c1a7e2f (plain)
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
CC = @CC@
CFLAGS = -Wall -Wextra -O2 -pipe 
LDLIBS = @CURSES_LIB@
TARGET = petratc
CONF = configure configure~ config.log config.status Makefile autom4te.cache/
SRC = petratc.c rat.c $(wildcard games/*.c)
OBJ = $(SRC:%.c=obj/%.o)
PREFIX = /usr/local

$(TARGET): $(OBJ)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LDLIBS)

install: $(TARGET)
	install -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/$(TARGET)

obj/%.o: %.c
	@mkdir -p $(@D)
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(TARGET) $(OBJ)

bigclean: 
	rm -rf $(TARGET) $(OBJ) $(CONF)