summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2019-07-14 23:23:01 +0930
committerDaniel Jones <admin@danieljon.es>2019-07-14 23:23:01 +0930
commit4ccab4a6d96a33b094471fe1b4f72872f2e7b12c (patch)
treeb4683c939ee15866a49c880a05b35f44e9ae5b98 /makefile
downloadrepostwarn-master.tar.gz
repostwarn-master.zip
initial codeHEADmaster
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..626f788
--- /dev/null
+++ b/makefile
@@ -0,0 +1,25 @@
+TARGET = repost
+LIBS = -lsqlite3
+CC = gcc
+CFLAGS = -g -Wall -Werror -std=c89 -pedantic
+
+.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)
+