aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..b82ee17
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,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)