From e2b7f01dfc654fb4407e83ea1be57974a3ef493a Mon Sep 17 00:00:00 2001 From: Graham Miller Date: Fri, 14 Jan 2011 13:20:41 -0500 Subject: initial commit --- Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b4a986 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +# source files. +SRC = encode.c +TEST_SRC = test_main.c encode_test.c + +OBJ = $(SRC:.c=.o) +TEST_OBJ = $(TEST_SRC:.c=.o) + +OUT = libgob.a + +# include directories +INCLUDES = -I. -I/usr/local/include + +# C++ compiler flags (-g -O2 -Wall) +CCFLAGS = -g + +# compiler +CC = gcc + +# library paths +LIBS = -L../ -L/usr/local/lib -lm + +# compile flags +LDFLAGS = -g + +CUNIT_LDFLAGS= -lcunit + +.SUFFIXES: .c + +default: $(OUT) + +.c.o: + $(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@ + +$(OUT): $(OBJ) + ar rcs $(OUT) $(OBJ) + +clean: + rm -f $(OBJ) $(TEST_OBJ) $(OUT) Makefile.bak + +test: $(OBJ) $(TEST_OBJ) + $(CC) $^ -o $@ -lm $(CUNIT_LDFLAGS) + +exe: $(OUT) main.o + $(CC) $^ -o $@ -lm -lgob -L. $(LDFLAGS) \ No newline at end of file -- cgit v1.2.3