2011-01-25 13:53:48 +01:00
|
|
|
# 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
|
2014-08-20 15:46:24 +02:00
|
|
|
$(1): $(2) ../common/Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \
|
2011-01-25 13:53:48 +01:00
|
|
|
$$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*)
|
2011-01-25 16:39:55 +01:00
|
|
|
flock $$(dir $(2)).lock -c '\
|
2012-11-16 22:38:57 +01:00
|
|
|
(cd "$$(dir $(2))" && win32-c-- /D=AUTOBUILD /D=LANG_RUS $(5) $$(notdir $(2)) >&2) && \
|
2011-01-25 13:53:48 +01:00
|
|
|
if [ -e $$(basename $$<) ]; then f=$$(basename $$<); else f=$$(basename $$<).com; fi && \
|
2011-01-25 16:39:55 +01:00
|
|
|
kpack --nologo $$$$f "$$@" && rm $$$$f'
|
2011-01-25 13:53:48 +01:00
|
|
|
endef
|
|
|
|
|
2011-01-25 16:31:10 +01:00
|
|
|
$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname),$(fparam))))
|