Development > Newbie Coding
(log) Actually got new build system to (partially) work on Windows 7
Mattn:
i'm only interested in a makefile-only solution and don't want to add extra scripts.
feel free to extend data.mk (the ZIP macro) with 7za, too
mikeg:
Hello,
I have a question to this: Is it possible (or generally a good idea) to put dependency task into its own make target to provide a faster build task? Each time I start a incremental build the dependency is recalculated even if I changed nothing on headers.
If it is an own task its up to the programmer to rebuild the dependencies during each build.
Just an opinion.
Regards
Mattn:
--- Quote from: Muton on October 17, 2010, 11:10:42 am ---Do you plan to use the -s switch in the future to reduce the file size?
--- End quote ---
this is done on the make install target - it calls install with the s option for binaries.
but there are also strip targets avaiable - make strip-ufo will only strip the ufo target, make strip will strip everything.
Mattn:
--- Quote from: mikeg on October 20, 2010, 04:18:22 am ---I have a question to this: Is it possible (or generally a good idea) to put dependency task into its own make target to provide a faster build task? Each time I start a incremental build the dependency is recalculated even if I changed nothing on headers.
--- End quote ---
if you could provide an example what you exactly mean and how to improve it... i will have a look at it.
Muton:
>> and please leave the -static-libgcc -static-libstdc++ flags for brush and radiant
> can you tell me why this is needed? this isn't needed for cross-compile with mingw-cross-env
You do a static build on mingw-cross-env
that is the reason why you dont need it
But on Windows we still use shared libs
that is the reason why we need it
This parameter wont interfere with a static build (you include it because of -static)
but is is needed for a shared build
===========================================================================
The make pk3 error
can be fixed in to ways
This will force make to use zip on windows instead of 7z or 7za
Why: Because 7z is unable to handle a large parameter list, while zip does its job
This is as slow as usual
but -j3 will help (on a dual core)
--- Code: (data.mk) ---define ZIP
- $(shell ([ -x "$$(which 7z 2> /dev/null)" -a $(OS) != "Windows_NT" ] && echo "7z a -tzip -mx=9") || ([ -x "$$(which 7z 2> /dev/null)" -a $(OS) != "Windows_NT" ] && echo "7z a -tzip -mx=9") || ([ -x "$$(which zip 2> /dev/null)" ] && echo "zip -u9"))
+ $(shell ([ $$OS != Windows_NT -a -x "$$(which 7z 2> /dev/null)" ] && echo "7z a -tzip -mx=9") || ([ $$OS != Windows_NT -a -x "$$(which 7za 2> /dev/null)" ] && echo "7za a -tzip -mx=9") || ([ -x "$$(which zip 2> /dev/null)" ] && echo "zip -u9"))
endef
--- End code ---
This will use the internal search algorithm of 7z and zip to find all files
Its a lot faster, because make.exe dont need to do a lot of string manipulation
Make.exe is slow on windows (single threaded)
--- Code: (data.mk) ---include build/pk3_def.mk
BASE_DIR = base
PAK_FILES_OUT = $(addprefix $(BASE_DIR)/,$(PAK_FILES))
pk3: $(PAK_FILES_OUT)
clean-pk3:
$(Q)rm -f $(PAK_FILES_OUT)
define FIND
$(shell find $(BASE_DIR)/$(1) -type f -print)
endef
define ZIP
$(shell ([ -x "$$(which 7z 2> /dev/null)" ] && echo "7z u -tzip -mx=9") || ([ -x "$$(which 7za 2> /dev/null)" ] && echo "7za u -tzip -mx=9") || ([ -x "$$(which zip 2> /dev/null)" ] && echo "zip -u9"))
endef
%.pk3 :
ifeq (7z,$(findstring 7z,$(call ZIP)))
ifeq ($(OS),Windows_NT)
$(Q)cd $(BASE_DIR) ; cmd /c "$(call ZIP) $(filter -r,$(call $@)) $(notdir $@) $(filter-out -r,$(call $@))"
else
$(Q)cd $(BASE_DIR) ; $(call ZIP) $(filter -r,$(call $@)) $(notdir $@) $(filter-out -r,$(call $@))
endif
else
$(Q)cd $(BASE_DIR) ; $(call ZIP) $(filter -r,$(call $@)) $(notdir $@) . -i $(subst *,\*,$(filter-out -r,$(call $@)))
endif
define $(BASE_DIR)/0pics.pk3
-r pics/*.jpg pics/*.tga pics/*.png
endef
define $(BASE_DIR)/0textures.pk3
-r textures/*.jpg textures/*.tga textures/*.png
endef
define $(BASE_DIR)/0models.pk3
-r models/*.mdx models/*.md2 models/*.md3 models/*.dpm models/*.obj models/*.jpg models/*.png models/*.tga models/*.anm models/*.tag
endef
define $(BASE_DIR)/0models.pk3
-r models/*.mdx models/*.md2 models/*.md3 models/*.dpm models/*.obj models/*.jpg models/*.png models/*.tga models/*.anm models/*.tag
endef
define $(BASE_DIR)/0snd.pk3
-r sound/*.ogg sound/*.wav
endef
define $(BASE_DIR)/0music.pk3
music/*.ogg
endef
define $(BASE_DIR)/0maps.pk3
-r maps/*.bsp maps/*.ump
endef
define $(BASE_DIR)/0videos.pk3
-r videos/*.roq videos/*.ogm
endef
define $(BASE_DIR)/0media.pk3
media/*.ttf
endef
define $(BASE_DIR)/0shaders.pk3
shaders/*.glsl
endef
define $(BASE_DIR)/0ufos.pk3
-r ufos/*.ufo
endef
define $(BASE_DIR)/0materials.pk3
materials/*.mat
endef
define $(BASE_DIR)/0base.pk3
*.cfg mapcycle.txt irc_motd.txt ai/*.lua
endef
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version