diff options
author | Graham Miller <graham.miller@gmail.com> | 2011-01-14 13:40:52 -0500 |
---|---|---|
committer | Graham Miller <graham.miller@gmail.com> | 2011-01-14 13:40:52 -0500 |
commit | 8f922d174e08026120363533dbf48349266ee7cb (patch) | |
tree | 3439022d0a226e93fec1b2ba284c7767843c256e /Makefile | |
download | libgob-8f922d174e08026120363533dbf48349266ee7cb.tar.gz libgob-8f922d174e08026120363533dbf48349266ee7cb.tar.bz2 |
Added tag 0.1 for changeset 74f74c375a95
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 |