-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (27 loc) · 787 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
include ../Makefile
PROJNAME = znzlib
INCFLAGS = $(ZLIB_INC)
LIBS = $(ZLIB_LIBS) $(ZNZ_LIBS)
SRCS=znzlib.c zindex.c
OBJS=znzlib.o zindex.o
TESTXFILES = testprog
depend:
$(RM) -f depend.mk
$(MAKE) depend.mk
depend.mk:
$(CC) $(DEPENDFLAGS) $(INCFLAGS) $(SRCS) >> depend.mk
lib: libznz.a
test: $(TESTXFILES)
znzlib.o: znzlib.c znzlib.h
$(CC) -fPIC -c $(CFLAGS) $(USEZLIB) $(INCFLAGS) $<
zindex.o: zindex.c zindex.h
$(CC) -fPIC -c $(CFLAGS) $(USEZLIB) $(INCFLAGS) $<
libznz.a: $(OBJS)
$(AR) -r libznz.a $(OBJS)
$(RANLIB) $@
$(CC) -shared -o libznz.so.2.zindex znzlib.o zindex.o -L./ -lznz -lz
testprog: libznz.a testprog.c
$(CC) $(CFLAGS) $(LDFLAGS) -o testprog testprog.c $(ZLIB_LIBS)
zindex: zindex.o main.c
$(CC) -o $@ $^ $(CFLAGS) $(ZLIB_LIBS)
include depend.mk