summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2019-12-25 17:47:44 +1030
committerDaniel Jones <admin@danieljon.es>2019-12-25 17:47:44 +1030
commitb849c66ee96271639474251330d17ace7b2953d2 (patch)
tree434814daf651c8262c9bd9d701d44584c8ca7640 /makefile
downloadwebsitegenerator-b849c66ee96271639474251330d17ace7b2953d2.tar.gz
websitegenerator-b849c66ee96271639474251330d17ace7b2953d2.zip
first commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..d12b76c
--- /dev/null
+++ b/makefile
@@ -0,0 +1,25 @@
+TARGET = generate
+LIBS =
+CC = gcc
+CFLAGS = -g -Wall -Werror -Wno-unused-variable
+
+.PHONY: default all clean
+
+default: $(TARGET)
+all: default
+
+OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
+HEADERS = $(wildcard *.h)
+
+%.o: %.c $(HEADERS)
+ $(CC) $(CFLAGS) -c $< -o $@
+
+.PRECIOUS: $(TARGET) $(OBJECTS)
+
+$(TARGET): $(OBJECTS)
+ $(CC) $(OBJECTS) -Wall $(LIBS) -o $@
+
+clean:
+ -rm -f *.o
+ -rm -f $(TARGET)
+