diff options
author | Graham Miller <graham.miller@gmail.com> | 2011-01-14 13:20:41 -0500 |
---|---|---|
committer | Graham Miller <graham.miller@gmail.com> | 2011-01-14 13:20:41 -0500 |
commit | e2b7f01dfc654fb4407e83ea1be57974a3ef493a (patch) | |
tree | 4e723404cb00c7ac660d6f45be275dc092046784 /Makefile | |
download | libgob-e2b7f01dfc654fb4407e83ea1be57974a3ef493a.tar.gz libgob-e2b7f01dfc654fb4407e83ea1be57974a3ef493a.tar.bz2 |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
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 |