Add build rules for building a library from src/utils files
This is an initial step on providing an alternative build system that uses libraries from src subdirectories.
This commit is contained in:
parent
be916e0012
commit
6a230ba274
4 changed files with 41 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
SUBDIRS=common crypto drivers hlr_auc_gw eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
|
SUBDIRS=common crypto drivers hlr_auc_gw eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@echo Nothing to be made.
|
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
|
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
|
||||||
|
|
1
src/utils/.gitignore
vendored
Normal file
1
src/utils/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
libutils.a
|
|
@ -1,9 +1,40 @@
|
||||||
all:
|
all: libutils.a
|
||||||
@echo Nothing to be made.
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for d in $(SUBDIRS); do make -C $$d clean; done
|
for d in $(SUBDIRS); do make -C $$d clean; done
|
||||||
rm -f *~ *.o *.d
|
rm -f *~ *.o *.d libutils.a
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@echo Nothing to be made.
|
@echo Nothing to be made.
|
||||||
|
|
||||||
|
|
||||||
|
ifndef CC
|
||||||
|
CC=gcc
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef CFLAGS
|
||||||
|
CFLAGS = -MMD -O2 -Wall -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
LIB_OBJS= \
|
||||||
|
base64.o \
|
||||||
|
common.o \
|
||||||
|
ip_addr.o \
|
||||||
|
radiotap.o \
|
||||||
|
uuid.o \
|
||||||
|
wpa_debug.o \
|
||||||
|
wpabuf.o
|
||||||
|
|
||||||
|
# Pick correct OS wrapper implementation
|
||||||
|
LIB_OBJS += os_unix.o
|
||||||
|
|
||||||
|
# Pick correct event loop implementation
|
||||||
|
LIB_OBJS += eloop.o
|
||||||
|
|
||||||
|
#LIB_OBJS += pcsc_funcs.o
|
||||||
|
|
||||||
|
libutils.a: $(LIB_OBJS)
|
||||||
|
$(AR) cr $@ $(LIB_OBJS)
|
||||||
|
|
||||||
|
-include $(OBJS:%.o=%.d)
|
||||||
|
|
|
@ -17,24 +17,24 @@ endif
|
||||||
CFLAGS += -I../src
|
CFLAGS += -I../src
|
||||||
CFLAGS += -I../src/utils
|
CFLAGS += -I../src/utils
|
||||||
|
|
||||||
OS_OBJS=../src/utils/os_unix.o
|
LIBS = ../src/utils/libutils.a
|
||||||
|
|
||||||
|
../src/utils/libutils.a:
|
||||||
|
$(MAKE) -C ../src/utils
|
||||||
|
|
||||||
BASE64_OBJS=test-base64.o \
|
BASE64_OBJS=test-base64.o \
|
||||||
../src/utils/base64.o \
|
$(LIBS)
|
||||||
$(OS_OBJS)
|
|
||||||
|
|
||||||
test-base64: $(BASE64_OBJS)
|
test-base64: $(BASE64_OBJS)
|
||||||
$(LDO) $(LDFLAGS) -o $@ $(BASE64_OBJS)
|
$(LDO) $(LDFLAGS) -o $@ $(BASE64_OBJS)
|
||||||
|
|
||||||
|
|
||||||
MILENAGE_OBJS=test-milenage.o \
|
MILENAGE_OBJS=test-milenage.o \
|
||||||
../src/utils/wpa_debug.o \
|
|
||||||
../src/crypto/aes-internal.o \
|
../src/crypto/aes-internal.o \
|
||||||
../src/crypto/aes-internal-enc.o \
|
../src/crypto/aes-internal-enc.o \
|
||||||
../src/crypto/aes-encblock.o \
|
../src/crypto/aes-encblock.o \
|
||||||
../src/crypto/milenage.o \
|
../src/crypto/milenage.o \
|
||||||
$(OS_OBJS)
|
$(LIBS)
|
||||||
|
|
||||||
test-milenage: $(MILENAGE_OBJS)
|
test-milenage: $(MILENAGE_OBJS)
|
||||||
$(LDO) $(LDFLAGS) -o $@ $(MILENAGE_OBJS)
|
$(LDO) $(LDFLAGS) -o $@ $(MILENAGE_OBJS)
|
||||||
|
|
Loading…
Reference in a new issue