summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..714305c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CC = gcc
+CFLAGS = -Wall -Wextra -pedantic -std=c99 -O3 -g
+LDFLAGS = -g
+SOURCES = doll.c
+TARGET = doll.o
+DOLL_TEST = doll_test
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+release: $(TARGET)
+
+$(DOLL_TEST): $(TARGET) $(DOLL_TEST).o
+ $(CC) $(LDFLAGS) $(TARGET) $(DOLL_TEST).o -o $(DOLL_TEST)
+
+test: $(TARGET) $(DOLL_TEST)
+ ./$(DOLL_TEST)
+
+re: clean release
+
+clean:
+ rm -rf *.o doc $(DOLL_TEST) $(TARGET)
+
+.PHONY: release test re clean