Merge pull request #16 from jiangyy/fix-makefile

Makefile.app: use rules to spefify the dependency, instead of sub-make
This commit is contained in:
Yanyan Jiang 2019-02-17 13:44:28 +08:00 committed by GitHub
commit ce2308aa80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -24,16 +24,13 @@ LINK_FILES += $(addsuffix -$(ARCH).a, $(join \
$(LINKLIBS) \ $(LINKLIBS) \
)) ))
.PHONY: app _app prebuild postbuild run clean .PHONY: app _app __dummy run clean
prebuild: $(PREBUILD)
postbuild: $(POSTBUILD) $(OBJS): $(PREBUILD)
_app: $(OBJS) am $(LIBS) _app: $(OBJS) am $(LIBS)
@bash $(AM_HOME)/am/arch/$(ARCH)/img/build $(BINARY) $(LINK_FILES) @bash $(AM_HOME)/am/arch/$(ARCH)/img/build $(BINARY) $(LINK_FILES)
$(POSTBUILD) __dummy: _app
app: app: $(POSTBUILD) __dummy
$(MAKE) prebuild
$(MAKE) _app
$(MAKE) postbuild
run: app run: app
@bash $(AM_HOME)/am/arch/$(ARCH)/img/run $(BINARY) @bash $(AM_HOME)/am/arch/$(ARCH)/img/run $(BINARY)