Merge pull request #278 from nmav/ocserv
[project/luci.git] / libs / px5g / Makefile
1 include ../../build/config.mk
2 include ../../build/module.mk
3 include ../../build/gccconfig.mk
4
5 PX5G_LIB_CFLAGS = -Isrc/ -include src/polarssl/rsa.h \
6         -include src/polarssl/x509.h \
7         $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(WFLAGS)
8
9 PX5G_OBJ_CFLAGS = -Isrc/ \
10         $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(WFLAGS)
11
12 PX5G_LIB = src/library/bignum.o src/library/havege.o src/library/rsa.o \
13                 src/library/sha1.o src/library/timing.o src/library/x509write.o
14 PX5G_OBJ = src/px5g.o
15
16 src/library/%.o: src/library/%.c
17         $(CC) $(PX5G_LIB_CFLAGS) $(FPIC) -c -o $@ $<
18
19 %.o: %.c
20         $(CC) $(PX5G_OBJ_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
21
22 compile: $(PX5G_LIB) $(PX5G_OBJ)
23         $(LINK) $(SHLIB_FLAGS) -o src/px5g.so $(PX5G_OBJ) $(PX5G_LIB)
24         mkdir -p dist$(LUA_LIBRARYDIR)
25         cp src/px5g.so dist$(LUA_LIBRARYDIR)/px5g.so
26
27 clean: luaclean
28         rm -f $(PX5G_OBJ) $(PX5G_LIB) src/*.o src/*.so src/*.a src/*.dll