nexus-am/Makefile.app

22 lines
541 B
Makefile
Raw Normal View History

2017-05-21 23:48:42 +08:00
.DEFAULT_GOAL = app
2017-05-21 23:22:51 +08:00
2017-05-21 22:10:24 +08:00
$(info Building $(NAME) [$(ARCH)])
include $(AM_HOME)/Makefile.check
2017-05-21 21:17:11 +08:00
APP_DIR ?= $(shell pwd)
2017-05-21 23:22:51 +08:00
INC_DIR += $(APP_DIR)/include/ $(AM_HOME)/klib/
2017-05-21 22:10:24 +08:00
DST_DIR ?= $(APP_DIR)/build/$(ARCH)/
2017-05-21 23:22:51 +08:00
BINARY ?= $(APP_DIR)/build/$(NAME)-$(ARCH)
2017-05-21 21:17:11 +08:00
$(shell mkdir -p $(DST_DIR))
2017-05-21 22:10:24 +08:00
include $(AM_HOME)/Makefile.compile
2017-05-21 21:17:11 +08:00
2017-05-21 23:22:51 +08:00
.PHONY: app clean
app: $(OBJS)
@cd $(AM_HOME) && make ARCH=$(ARCH)
2017-05-21 23:48:42 +08:00
@$(AM_HOME)/am/arch/$(ARCH)/img/build $(BINARY) $(AM_HOME)/am/build/am-$(ARCH).a $(AM_HOME)/klib/build/klib-$(ARCH).a $(OBJS)
2017-05-21 21:43:53 +08:00
2017-05-21 23:22:51 +08:00
clean:
2017-05-21 21:43:53 +08:00
rm -rf $(APP_DIR)/build/