PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 38ms app.codeStats 0ms

/Makefile

https://code.google.com/p/libgob/
Makefile | 44 lines | 23 code | 15 blank | 6 comment | 0 complexity | 3d2b002a5b88f5ca090adebe7543178a MD5 | raw file
 1# source files.
 2SRC = encode.c
 3TEST_SRC = test_main.c encode_test.c
 4
 5OBJ = $(SRC:.c=.o)
 6TEST_OBJ = $(TEST_SRC:.c=.o)
 7
 8OUT = libgob.a
 9
10# include directories
11INCLUDES = -I. -I/usr/local/include
12
13# C++ compiler flags (-g -O2 -Wall)
14CCFLAGS ?= -g
15
16# compiler
17CC = gcc
18
19# library paths
20LIBS = -L../ -L/usr/local/lib -lm
21
22# compile flags
23LDFLAGS ?= -g
24
25CUNIT_LDFLAGS= -lcunit
26
27.SUFFIXES: .c
28
29default: $(OUT)
30
31.c.o:
32	$(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@
33
34$(OUT): $(OBJ)
35	ar rcs $(OUT) $(OBJ)
36
37clean:
38	rm -f $(OBJ) $(TEST_OBJ) $(OUT) Makefile.bak 
39
40test: $(OBJ) $(TEST_OBJ)
41	$(CC) $^ -o $@ -lm $(CUNIT_LDFLAGS)
42
43exe: $(OUT) main.o
44	$(CC) $^ -o $@ -lm -lgob -L. $(LDFLAGS)