summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--gramscii.c (renamed from main.c)0
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 24aa1d3..71887b1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,9 @@
include config.mk
-SRC = main.c draw.c screen.c files.c lineset.c
+SRC = gramscii.c draw.c screen.c files.c lineset.c
INC = config.h gramscii.h arg.h
+OBJ = ${SRC:.c=.o}
DISTFILES = ${SRC} ${INC} Makefile config.mk README.md Changelog
all: options gramscii
@@ -16,14 +17,15 @@ options:
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
@echo "-+-+-+-+-+-+-+-+-+-+-"
-
-gramscii: ${SRC} ${INC}
- ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${SRC}
-
+
+gramscii: ${OBJ}
+
+${OBJ}: ${INC}
+
clean:
@echo cleaning
- @rm -f gramscii
+ @rm -f gramscii ${OBJ}
install: all
@echo installing executable to ${DESTDIR}${BINDIR}
diff --git a/main.c b/gramscii.c
index 9a6ef59..9a6ef59 100644
--- a/main.c
+++ b/gramscii.c