mssl: get rid of MatrixSSL completely, use CyaSSL in non-VPN builds
[tomato.git] / release / src / router / mssl / Makefile
blobe3de62037e5ccf4d47a6d156270afce0bfce40be
1 include ../common.mak
3 CFLAGS = -Os -Wall $(EXTRACFLAGS) -fPIC
4 LIBS = -lpthread
5 LDFLAGS =
7 ifeq ($(TCONFIG_OPENVPN),y)
8 CFLAGS += -I$(TOP)/openssl/include -DUSE_OPENSSL
9 LIBS += -L$(TOP)/openssl -lssl -lcrypto
10 else
11 CFLAGS += -I$(TOP)/cyassl/include
12 LIBS += $(TOP)/cyassl/src/.libs/libcyassl.a
13 endif
15 OBJ = mssl.o
17 all: libmssl.so libmssl.a
19 libmssl.so: $(OBJ)
20 $(CC) -shared -o $@ $^ $(LIBS)
21 $(STRIP) $@
22 $(CPTMP)
24 libmssl.a: $(OBJ)
25 rm -f $@
26 $(AR) cruv $@ $^
28 clean:
29 rm -f .*.depend *.o *.so *.a
31 install: all
32 @echo " [mssl] Installing..."
33 install -D libmssl.so $(INSTALLDIR)/usr/lib/libmssl.so
34 $(STRIP) $(INSTALLDIR)/usr/lib/libmssl.so
36 %.o: %.c .%.depend
37 @echo " [mssl] CC $@"
38 @$(CC) $(CFLAGS) -c $<
40 .depend: $(OBJS:%.o=%.c)
41 @$(CC) $(CFLAGS) -M $^ > .depend
43 .%.depend: %.c
44 @$(CC) $(CFLAGS) -M $< > $@
46 -include $(OBJS:%.o=.%.depend)