Subversion Repositories Kolibri OS

Rev

Rev 1820 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. # This is similar to Makefile.fasm, look there for comments.
  2. define nasm_meta_rule
  3. .deps/$(4).Po: $(2) ../common/Makefile.nasm .deps/.dir
  4.         nasm -I$$(dir $(2)) -o "$(1)" -M $$< > .deps/$(4).Tpo 2>/dev/null; \
  5.         if [ $$$$? -eq 0 ]; then perl -ln -e 'next unless $$$$_;' \
  6.         -e 'm/((.*): )?(.*)/;$$$$a=$$$$2 if $$$$2;push @b,$$$$3;' \
  7.         -e 'END{$$$$b=join "\n",@b;print "$$$$a .deps/$(4).Po: $$$$b\n$$$$b:"}' \
  8.         .deps/$(4).Tpo > .deps/$(4).Po; fi
  9.         rm -f .deps/$(4).Tpo
  10. $(1): $(2) ../common/Makefile.nasm $$(call respace,$$(addsuffix .dir,$(3)))
  11.         nasm -I$$(dir $(2)) -o "$$@" $$<
  12.         kpack --nologo "$$@"
  13. -include .deps/$(4).Po
  14. endef
  15.  
  16. $(foreach f,$(NASM_PROGRAMS),$(eval $(call nasm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname))))
  17.