From 68ecb4d4cdce93a5f56a3d6c1b35ade09df2297a Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Tue, 25 Jan 2011 15:31:10 +0000 Subject: [PATCH] Makefile: allow additional parameters for C-- compiler, autobuild games/mine git-svn-id: svn://kolibrios.org@1766 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/Makefile | 15 +++++++++------ data/eng/Makefile.cmm | 4 ++-- data/eng/games/mine | Bin 1839 -> 0 bytes data/rus/Makefile | 15 +++++++++------ data/rus/Makefile.cmm | 4 ++-- data/rus/games/mine | Bin 1839 -> 0 bytes 6 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 data/eng/games/mine delete mode 100644 data/rus/games/mine diff --git a/data/eng/Makefile b/data/eng/Makefile index e3c8c81ed7..feec8822ea 100644 --- a/data/eng/Makefile +++ b/data/eng/Makefile @@ -191,13 +191,13 @@ COPY_FILES:=\ games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini # The list of all C-- programs with one main C-- file. -# Format of an item is exactly the same as in the previous list. +# Format of an item is exactly the same as in the previous list, +# except that there can be fourth field with parameters for a compiler. CMM_PROGRAMS:=\ File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c-- \ + games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ # end if list -# mine is not compilable -# games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c-- # List of other files to be included in the image file. # Some of them are auto-built with special rules, some just exist before build. @@ -235,7 +235,7 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ games/FindNumbers:GAMES/FindNumbers games/gomoku:GAMES/GOMOKU \ games/klavisha:GAMES/KLAVISHA games/kosilka:GAMES/KOSILKA \ games/kosskin.gfx:GAMES/KOSSKIN.GFX games/kox:GAMES/KOX \ - games/lights:GAMES/LIGHTS games/megamaze:GAMES/MEGAMAZE games/mine:GAMES/MINE \ + games/lights:GAMES/LIGHTS games/megamaze:GAMES/MEGAMAZE \ games/msquare:GAMES/MSQUARE \ games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ games/sq_game:GAMES/SQ_GAME \ @@ -257,11 +257,13 @@ respace=$(subst |,$(space),$(1)) binarypart=$(word 1,$(subst :, ,$(1))) imagepart=$(word 2,$(subst :, ,$(1))) sourcepart=$(word 3,$(subst :, ,$(1))) +parampart=$(word 4,$(subst :, ,$(1))) # Get file names, possibly with spaces inside, from an item. # Here $(f) is an item - in fact, macro argument. fbinary=$(call respace,$(call binarypart,$(f))) fimage=$(call respace,$(call imagepart,$(f))) fsource=$(call respace,$(call sourcepart,$(f))) +fparam=$(call respace,$(call parampart,$(f))) # Define targets for image file. # Join all the lists above. @@ -273,7 +275,7 @@ targets:=$(foreach f,$(targets_full),$(fbinary)) # mcopy_command is a macro with two parameters, # local file name $(1) and image file name $(2). # Note that spaces in these have to be escaped with backslashes. -mcopy_command=mcopy -mi $(BUILD_DIR)/kolibri.img $(1) ::$(2) +mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) # Specialize a previous command for an item $(f) in one of lists. mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) @@ -312,8 +314,9 @@ $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK $(mcopy_all_items) -# Special target to modify behaviour of make. +# Special targets to modify behaviour of make. .DELETE_ON_ERROR: +.SUFFIXES: # delete all predefined rules # The floppy bootsector. $(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc diff --git a/data/eng/Makefile.cmm b/data/eng/Makefile.cmm index 46a9a219cb..f545ce0034 100644 --- a/data/eng/Makefile.cmm +++ b/data/eng/Makefile.cmm @@ -7,9 +7,9 @@ define cmm_meta_rule $(1): $(2) Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \ $$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*) flock $$(dir $(2)).lock \ - win32-c-- /IP=Z:$$(dir $(2)) Z:$$< >&2 && \ + win32-c-- $(5) /IP=Z:$$(dir $(2)) Z:$$< >&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)))) +$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname),$(fparam)))) diff --git a/data/eng/games/mine b/data/eng/games/mine deleted file mode 100644 index f9693bc3aaa58568b05416c9c622c86ebc21a00e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1839 zcmV+~2hjLSP(w>p4FCXv00001Mv*2LLXK;4&&M}uw68P%+lNI;Spd*dRsQc;2Cv5F zV$iX%Yg(0emz&2JXICZ6t~3)_76d_DzW@DfIxkYxaYpnbCA*7ZB5Jsxb9Spsw0H7K z5|37RB%&8odk^z;LMT@CXhNEbSs+x1Mnol|v@J^S*u?z`ot*OE*rcQ8GjBiOdMFr!IP!+$c;=1Ihz1|8VO2faVYtc!_}W!0T4E+v`FbIPVL$H7XCJd!u;Kq zc>MYXqT#&{2$AYm>wQfBvXT7UiQK$k3y09%Z;GWQ9I>YWiAw5y{~=sW_VjfZ4#6&@p@ZQXrDrOsazx$DR>E$Tz}23gbfHFO{hMXEh&;2H0-!fC?)B ziK-V+Q9V}+u2^vWg!{AtVW)2Nz&v9Fhl>QntM;^^z({D@cja#BM9-7Z33t_KS7?}K5*k}&oWEm6@(-YOCycO? zaDGTWfCTs;`~h4pYRZSh>OjEavFONiqEA)6ak>^zEXVap5<37>N#w98L)s%#%v}~u zI34jxU438HdMF1g*PJC1>e*vC7#-99%du+EoyYMkPXX>{$I|Rye%{-eQ^iI8nWRua z$Y4xeNJ^Pcu_!{m8jJx|Y?$~aKV{~tl^4I57^xEy=i45)o$l@Zv3o*AHnnbAXf$?gvMNOuM=U7W8c>!hx}EjSG_vy+t2a0munN00Q{yi( z%RxR!KQuY0)F-gxn>!Ue%7*_!JdlhbbqfyWY@XKcSBA(u8o78VRr0ras#B6LU78C2 zL=bi8wD4yjaJyBNDO5HGTl-YY|W!%isL zR5|x(GDZ96r#-4RZ!#AZ4TyfDxt{yJb`m#WE+ch9F61?C5Y&G!Lwd*6zJA!;%Qxy` zXHZZ_IqN{P$tSZ;2SlfPb-c2fZC$#BPd%O3F&;6~I_v8pEX>hj=_bQ5g zv^1?>oUL*?<9kFQw9V=y3sCfD=S6U8zMNY6VzOWD7!!gz(J}$$SE}Sc9b-480cBMS z-rj1sGuWPjXj#vTsOZA5XH5Q?_}c&vZi1*Ph_7pv-F%-c0DHt$6B}g!xwE5Io=xU* dMpJD;T8DCt2WubjSzB44fr=S%0B8UJ0062yc@Y2r diff --git a/data/rus/Makefile b/data/rus/Makefile index 38ca69c077..469d007bcc 100644 --- a/data/rus/Makefile +++ b/data/rus/Makefile @@ -191,13 +191,13 @@ COPY_FILES:=\ games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini # The list of all C-- programs with one main C-- file. -# Format of an item is exactly the same as in the previous list. +# Format of an item is exactly the same as in the previous list, +# except that there can be fourth field with parameters for a compiler. CMM_PROGRAMS:=\ File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c-- \ + games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c--:/MEOS \ # end if list -# mine is not compilable -# games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c-- # List of other files to be included in the image file. # Some of them are auto-built with special rules, some just exist before build. @@ -236,7 +236,7 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ games/FindNumbers:GAMES/FindNumbers games/gomoku:GAMES/GOMOKU \ games/klavisha:GAMES/KLAVISHA games/kosilka:GAMES/KOSILKA \ games/kosskin.gfx:GAMES/KOSSKIN.GFX games/kox:GAMES/KOX \ - games/lights:GAMES/LIGHTS games/megamaze:GAMES/MEGAMAZE games/mine:GAMES/MINE \ + games/lights:GAMES/LIGHTS games/megamaze:GAMES/MEGAMAZE \ games/msquare:GAMES/MSQUARE games/padenie:GAMES/PADENIE \ games/reversi:GAMES/REVERSI games/rforces:GAMES/RFORCES \ games/sq_game:GAMES/SQ_GAME \ @@ -258,11 +258,13 @@ respace=$(subst |,$(space),$(1)) binarypart=$(word 1,$(subst :, ,$(1))) imagepart=$(word 2,$(subst :, ,$(1))) sourcepart=$(word 3,$(subst :, ,$(1))) +parampart=$(word 4,$(subst :, ,$(1))) # Get file names, possibly with spaces inside, from an item. # Here $(f) is an item - in fact, macro argument. fbinary=$(call respace,$(call binarypart,$(f))) fimage=$(call respace,$(call imagepart,$(f))) fsource=$(call respace,$(call sourcepart,$(f))) +fparam=$(call respace,$(call parampart,$(f))) # Define targets for image file. # Join all the lists above. @@ -274,7 +276,7 @@ targets:=$(foreach f,$(targets_full),$(fbinary)) # mcopy_command is a macro with two parameters, # local file name $(1) and image file name $(2). # Note that spaces in these have to be escaped with backslashes. -mcopy_command=mcopy -mi $(BUILD_DIR)/kolibri.img $(1) ::$(2) +mcopy_command=mcopy -moi $(BUILD_DIR)/kolibri.img $(1) ::$(2) # Specialize a previous command for an item $(f) in one of lists. mcopy_item_command=$(call mcopy_command,$(fbinary),$(fimage)) @@ -313,8 +315,9 @@ $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK $(mcopy_all_items) -# Special target to modify behaviour of make. +# Special targets to modify behaviour of make. .DELETE_ON_ERROR: +.SUFFIXES: # disable all predefined rules # The floppy bootsector. $(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc diff --git a/data/rus/Makefile.cmm b/data/rus/Makefile.cmm index 46a9a219cb..f545ce0034 100644 --- a/data/rus/Makefile.cmm +++ b/data/rus/Makefile.cmm @@ -7,9 +7,9 @@ define cmm_meta_rule $(1): $(2) Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \ $$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*) flock $$(dir $(2)).lock \ - win32-c-- /IP=Z:$$(dir $(2)) Z:$$< >&2 && \ + win32-c-- $(5) /IP=Z:$$(dir $(2)) Z:$$< >&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)))) +$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname),$(fparam)))) diff --git a/data/rus/games/mine b/data/rus/games/mine deleted file mode 100644 index f9693bc3aaa58568b05416c9c622c86ebc21a00e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1839 zcmV+~2hjLSP(w>p4FCXv00001Mv*2LLXK;4&&M}uw68P%+lNI;Spd*dRsQc;2Cv5F zV$iX%Yg(0emz&2JXICZ6t~3)_76d_DzW@DfIxkYxaYpnbCA*7ZB5Jsxb9Spsw0H7K z5|37RB%&8odk^z;LMT@CXhNEbSs+x1Mnol|v@J^S*u?z`ot*OE*rcQ8GjBiOdMFr!IP!+$c;=1Ihz1|8VO2faVYtc!_}W!0T4E+v`FbIPVL$H7XCJd!u;Kq zc>MYXqT#&{2$AYm>wQfBvXT7UiQK$k3y09%Z;GWQ9I>YWiAw5y{~=sW_VjfZ4#6&@p@ZQXrDrOsazx$DR>E$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