From e8a9558a65ae43d3fdeecdebe59d4a1c66640435 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Mon, 29 Nov 2010 01:38:18 -0600 Subject: Initial commit --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c6cd713 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PROG = trees +OBJS = $(PROG).o +CC = gcc +DBGFLAGS = -g -O0 +ifdef DEBUG + CFLAGS = $(DBGFLAGS) -Wall -std=c99 +else + CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native +endif +LDFLAGS = -lm + +$(PROG): $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) -o $(PROG) + +$(PROG).o: $(PROG).c trees.h + $(CC) -c $(CFLAGS) $(PROG).c + +.PHONY: clean + +clean: + rm -f *.o ./$(PROG) -- cgit v1.2.3