aboutsummaryrefslogtreecommitdiff
path: root/snag/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'snag/makefile')
-rw-r--r--snag/makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/snag/makefile b/snag/makefile
new file mode 100644
index 0000000..8fa032c
--- /dev/null
+++ b/snag/makefile
@@ -0,0 +1,22 @@
+CC = gcc
+CFLAGS = -Wall -g
+
+TARGET = snag
+
+SRCS = main.c
+OBJS = $(SRCS:.c=.o)
+
+.SILENT: $(OBJS) $(TARGET)
+
+all: $(TARGET)
+
+clean:
+ rm -f $(OBJS) $(TARGET)
+
+$(TARGET): $(OBJS)
+ printf " LD %s\n" $@
+ $(CC) $(CFLAGS) -o $@ $<
+
+%.o: %.c
+ printf " CC %s\n" $<
+ $(CC) $(CFLAGS) -c $< -o $@