1ROOT_DIR=../../../.. 2BUILD_DIR=$(ROOT_DIR)/build 3include $(ROOT_DIR)/common.mk 4 5# Remove old includes with bad relative folders 6CFLAGS := $(patsubst -I%,,$(CFLAGS)) 7# Add proper includes 8CFLAGS += -I$(ROOT_DIR)/include/ 9 10all: dsa 11ifeq ($(WITH_DYNAMIC_LIBS),1) 12# If the user asked for dynamic libraries, compile versions of our binaries against them 13all: dsa_dyn 14endif 15 16libhash: 17 # Compile the hashes 18 $(VERBOSE_MAKE)cd ../../hash && EXTRA_CFLAGS="$(CFLAGS)" make libhash.a 19 20dsa: libhash 21 $(VERBOSE_MAKE)$(CROSS_COMPILE)$(CC) $(BIN_CFLAGS) -DDSA dsa.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) ../../hash/libhash.a $(LIBSIGN) -o dsa 22 23# If the user asked for dynamic libraries, compile versions of our binaries against them 24ifeq ($(WITH_DYNAMIC_LIBS),1) 25dsa_dyn: libhash 26 $(VERBOSE_MAKE)$(CROSS_COMPILE)$(CC) $(BIN_CFLAGS) -DDSA dsa.c ../../hash/hash.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) $(LIBEC) -L$(BUILD_DIR) ../../hash/libhash.a -lsign -o dsa_dyn 27endif 28 29 30clean: 31 @rm -f dsa 32 @rm -f dsa_dyn 33 34.PHONY: all clean 16 32 64 debug debug16 debug32 debug64 force_arch32 force_arch64 35