mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-23 03:05:27 +00:00
22 lines
702 B
Makefile
22 lines
702 B
Makefile
PROJECT_DIR = $(CURDIR)
|
|
LIB_DIR = $(PROJECT_DIR)/lib
|
|
PROGRAM_DIR = $(PROJECT_DIR)/programs
|
|
BIN_DIR = $(PROJECT_DIR)/bin
|
|
|
|
LIBS = libpolarssl liblz4 libfnd libes libpki libctr libhac libhac-hb
|
|
PROGS = nstool ctr-test
|
|
|
|
main: build
|
|
|
|
rebuild: clean build
|
|
|
|
build:
|
|
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);)
|
|
|
|
|
|
clean:
|
|
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);)
|