1
0
kolibrios/data/Vortex86MX-eng/Makefile.cmm
CleverMouse 666c52df30 try to play around limitations in this !@#!@%@ compiler. Really, try to avoid C-- if you can and even if you can not
git-svn-id: svn://kolibrios.org@3048 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-11-16 21:38:57 +00:00

16 lines
780 B
Makefile

# This is similar to Makefile.fasm, look there for comments.
# No dependency tracking, so force dependencies on all files
# in dir/* and dir/*/*
# Also, we cannot set output file name and need to guess
# whether c-- has created .com file or no-extension file.
define cmm_meta_rule
$(1): $(2) Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \
$$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*)
flock $$(dir $(2)).lock -c '\
(cd "$$(dir $(2))" && win32-c-- /D=AUTOBUILD /D=LANG_ENG $(5) $$(notdir $(2)) >&2) && \
if [ -e $$(basename $$<) ]; then f=$$(basename $$<); else f=$$(basename $$<).com; fi && \
kpack --nologo $$$$f "$$@" && rm $$$$f'
endef
$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname),$(fparam))))