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: gostr34_10_94 11ifeq ($(WITH_DYNAMIC_LIBS),1) 12# If the user asked for dynamic libraries, compile versions of our binaries against them 13all: gostr34_10_94_dyn 14endif 15 16libhash: 17 # Compile the hashes 18 $(VERBOSE_MAKE)cd ../../hash && EXTRA_CFLAGS="$(CFLAGS)" make libhash.a 19 20gostr34_10_94: libhash 21 $(VERBOSE_MAKE)$(CROSS_COMPILE)$(CC) $(BIN_CFLAGS) -DGOSTR34_10_94 gostr34_10_94.c ../dsa/dsa.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) ../../hash/libhash.a $(LIBSIGN) -o gostr34_10_94 22 23# If the user asked for dynamic libraries, compile versions of our binaries against them 24ifeq ($(WITH_DYNAMIC_LIBS),1) 25gostr34_10_94_dyn: libhash 26 $(VERBOSE_MAKE)$(CROSS_COMPILE)$(CC) $(BIN_CFLAGS) -DGOSTR34_10_94 gostr34_10_94.c ../dsa/dsa.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) ../../hash/libhash.a $(LIBEC) -L$(BUILD_DIR) -lsign -o gostr34_10_94_dyn 27endif 28 29 30clean: 31 @rm -f gostr34_10_94 32 @rm -f gostr34_10_94_dyn 33 34.PHONY: all clean 16 32 64 debug debug16 debug32 debug64 force_arch32 force_arch64 35