Commit c131d50

mo khan <mo.khan@gmail.com>
2020-06-29 18:53:35
Create Makefile for assignment 1 question 1.a
1 parent e5f55cf
src/01/01a/Makefile
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+SHELL=/bin/sh
+
+CC=gcc
+LIBS = -lcgreen
+
+BUILDDIR := build
+OBJS := $(addprefix $(BUILDDIR)/,priority_queue.o priority_queue_test.o)
+
+$(BUILDDIR)/%.o : %.c
+	$(COMPILE.c) $(OUTPUT_OPTION) $<
+
+.PHONY: all
+all: $(OBJS)
+	$(CC) $(OBJS) $(LIBS) -o $(BUILDDIR)/program
+
+$(OBJS): | $(BUILDDIR)
+
+$(BUILDDIR):
+	mkdir $(BUILDDIR)
+
+.PHONY: clean
+clean:
+	rm -fr build
+
+test : all
+	cgreen-runner -c -v $(BUILDDIR)/program
src/01/01a/priority_queue.c
src/01/01a/priority_queue.h
src/01/01a/README.md