2018-09-25 08:59:28 +00:00
|
|
|
PROJECT_DIR = "$(CURDIR)"
|
2018-08-07 06:00:09 +00:00
|
|
|
LIB_DIR = $(PROJECT_DIR)/lib
|
|
|
|
PROGRAM_DIR = $(PROJECT_DIR)/programs
|
|
|
|
BIN_DIR = $(PROJECT_DIR)/bin
|
|
|
|
|
2018-09-22 14:41:12 +00:00
|
|
|
LIBS = libpolarssl liblz4 libfnd libes libpki libctr libhac libhac-hb
|
|
|
|
PROGS = nstool ctr-test
|
2018-08-07 06:00:09 +00:00
|
|
|
|
2017-07-05 08:58:33 +00:00
|
|
|
main: build
|
|
|
|
|
|
|
|
rebuild: clean build
|
|
|
|
|
|
|
|
build:
|
2018-08-07 06:00:09 +00:00
|
|
|
mkdir -p $(BIN_DIR)
|
|
|
|
@$(foreach lib,$(LIBS), cd $(LIB_DIR)/$(lib) && $(MAKE) && cd $(PROJECT_DIR);)
|
|
|
|
@$(foreach prog,$(PROGS), cd $(PROGRAM_DIR)/$(prog) && $(MAKE) && cd $(PROJECT_DIR) && cp -r $(PROGRAM_DIR)/$(prog)/bin/* $(BIN_DIR);)
|
|
|
|
|
2017-07-05 08:58:33 +00:00
|
|
|
|
|
|
|
clean:
|
2018-08-07 06:00:09 +00:00
|
|
|
rm -rf $(BIN_DIR)
|
|
|
|
@$(foreach lib,$(LIBS), cd $(LIB_DIR)/$(lib) && $(MAKE) clean && cd $(PROJECT_DIR);)
|
|
|
|
@$(foreach prog,$(PROGS), cd $(PROGRAM_DIR)/$(prog) && $(MAKE) clean && cd $(PROJECT_DIR);)
|