Subversion Repositories Kolibri OS

Rev

Rev 3927 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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