CONFIGURE YAYY BETTER BUILD METHODS lslsls! ANYTHING BUT WRITING ACTUAL CODElslslslslslslslslslslslslslslsls

This commit is contained in:
david committed 2026-07-24 18:40:14 -03:00
1 parent d64804517b
commit 9e5372a6db
5 files changed
+4767 -4

No files matched your search

+27
View File
@@ -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)