Build radius_example using src/*/lib*.a

This commit is contained in:
Jouni Malinen 2009-12-24 12:05:51 +02:00
parent 174e899f69
commit e20845184a

View file

@ -6,42 +6,38 @@ ifndef CC
CC=gcc CC=gcc
endif endif
ifndef LDO
LDO=$(CC)
endif
ifndef CFLAGS ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g CFLAGS = -MMD -O2 -Wall -g
endif endif
CFLAGS += -I. CFLAGS += -I.
CFLAGS += -I../src CFLAGS += -I../src
CFLAGS += -I../src/crypto
CFLAGS += -I../src/utils CFLAGS += -I../src/utils
OBJS += ../src/utils/common.o LIBS = ../src/radius/libradius.a
OBJS += ../src/utils/os_unix.o LIBS += ../src/crypto/libcrypto.a
OBJS += ../src/utils/wpa_debug.o LIBS += ../src/utils/libutils.a
OBJS += ../src/utils/wpabuf.o
OBJS += ../src/utils/eloop.o
OBJS += ../src/utils/ip_addr.o
OBJS += ../src/crypto/md5.o ../src/crypto/md5-internal.o
OBJS += ../src/radius/radius.o ../src/utils/libutils.a:
OBJS += ../src/radius/radius_client.o $(MAKE) -C ../src/utils
ifndef LDO ../src/crypto/libcrypto.a:
LDO=$(CC) $(MAKE) -C ../src/crypto
endif
../src/radius/libradius.a:
$(MAKE) -C ../src/radius
OBJS_ex = radius_example.o OBJS_ex = radius_example.o
libradius.a: $(OBJS) radius_example: $(OBJS_ex) $(LIBS)
ar rc libradius.a $(OBJS) $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS)
ranlib libradius.a
radius_example: $(OBJS_ex) libradius.a
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) -L. -lradius $(LIBS)
clean: clean:
$(MAKE) -C ../src clean $(MAKE) -C ../src clean
rm -f core *~ *.o *.d libradius.a $(ALL) rm -f core *~ *.o *.d $(ALL)
-include $(OBJS:%.o=%.d) -include $(OBJS:%.o=%.d)