- Timestamp:
- Jun 1, 2004 2:36:56 PM (21 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r81 r83 34 34 35 35 # all targets. 36 ALL_TARGETS := $(LIBRARIES) $(PROGRAMS) $(DLLS) $( DRIVERS) $(OTHERS)36 ALL_TARGETS := $(LIBRARIES) $(PROGRAMS) $(DLLS) $(SYSMODS) $(OTHERS) 37 37 38 38 # dependency files. … … 49 49 _DLLS := 50 50 _EXES := 51 _SYSMODS:= 51 52 _DIRS := 52 53 … … 694 695 695 696 # 696 # DRIVERS 697 # 697 # SYSMODS 698 # 699 700 ## System moduler (one). 701 # @param $(target) Normalized target (program) name. 702 define def_sysmod 703 # source -> object 704 $(eval $(def_target_sources)) 705 706 # library 707 $(eval tool := $(call _TARGET_TOOL,$(target),LD)) 708 $(eval flags :=\ 709 $(TOOL_$(tool)_LDFLAGS)\ 710 $(TOOL_$(tool)_LDFLAGS.$(BUILD_TYPE))\ 711 $(LDFLAGS)\ 712 $(LDFLAGS.$(BUILD_TYPE))\ 713 $($(target)_LDFLAGS)\ 714 $($(target)_LDFLAGS.$(BUILD_TYPE))\ 715 ) 716 $(eval syssuff := $(firstword $($(target)_SYSSUFF) $($(target)_SYSSUFF) $(TOOL_$(tool)_LDSYSSUFF) $(SUFF_SYS))) 717 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 718 $(eval sys := $(outbase)$(syssuff)) 719 $(eval objs = $(_OBJS_$(target))) 720 $(eval libs :=\ 721 $($(target)_LIBS.$(BUILD_TYPE))\ 722 $($(target)_LIBS)\ 723 $(LIBS.$(BUILD_TYPE))\ 724 $(LIBS)\ 725 $(TOOL_$(tool)_LIBS.$(BUILD_TYPE))\ 726 $(TOOL_$(tool)_LIBS)\ 727 ) 728 $(eval libpath :=\ 729 $($(target)_LIBPATH.$(BUILD_TYPE))\ 730 $($(target)_LIBPATH)\ 731 $(LIBPATH.$(BUILD_TYPE))\ 732 $(LIBPATH)\ 733 $(TOOL_$(tool)_LIBPATH.$(BUILD_TYPE))\ 734 $(TOOL_$(tool)_LIBPATH)\ 735 ) 736 $(eval dirdep := $(dir $(sys)).dir_created) 737 ## @todo fix dependencies 738 $(eval deps := ) 739 # 740 $(eval deffile := $(strip $(firstword 741 $($(target)_DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\ 742 $($(target)_DEFFILE.$(BUILD_TARGET))\ 743 $($(target)_DEFFILE.$(BUILD_TYPE))\ 744 $($(target)_DEFFILE)\ 745 $(DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\ 746 $(DEFFILE.$(BUILD_TARGET))\ 747 $(DEFFILE.$(BUILD_TYPE))\ 748 $(DEFFILE)\ 749 ))) 750 $(eval custom_pre := $(strip $(firstword 751 $($(target)_CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ 752 $($(target)_CUSTOM_PRE.$(BUILD_TARGET))\ 753 $($(target)_CUSTOM_PRE.$(BUILD_TYPE))\ 754 $($(target)_CUSTOM_PRE)\ 755 $(CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ 756 $(CUSTOM_PRE.$(BUILD_TARGET))\ 757 $(CUSTOM_PRE.$(BUILD_TYPE))\ 758 $(CUSTOM_PRE)\ 759 ))) 760 $(eval custom_post := $(strip $(firstword 761 $($(target)_CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\ 762 $($(target)_CUSTOM_POST.$(BUILD_TARGET))\ 763 $($(target)_CUSTOM_POST.$(BUILD_TYPE))\ 764 $($(target)_CUSTOM_POST)\ 765 $(CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\ 766 $(CUSTOM_POST.$(BUILD_TARGET))\ 767 $(CUSTOM_POST.$(BUILD_TYPE))\ 768 $(CUSTOM_POST)\ 769 ))) 770 771 $(eval $(TOOL_$(tool)_LINK_SYSMOD)) 772 773 _OBJS += $(_OBJS_$(target)) 774 _SYSMODS += $(sys) 775 _OUT_FILES += $(sys) 776 endef 777 778 # Process libraries 779 $(foreach target, $(SYSMODS), $(eval $(def_sysmod))) 698 780 699 781 … … 713 795 # Directories. 714 796 # 715 _OUTPUT_FILES := $(_OBJS) $(_LIBS) $(_EXES) $(_DLLS) 797 _OUTPUT_FILES := $(_OBJS) $(_LIBS) $(_EXES) $(_DLLS) $(_SYSMODS) 716 798 _DIRFILES := $(sort $(addsuffix /.dir_created,$(_DIRS)) $(addsuffix .dir_created,$(dir $(_OUTPUT_FILES)))) 717 799 … … 805 887 806 888 ## PASS: binaries 807 # This pass builds binary targets, i.e. programs, dlls, drivers and stuff.808 pass_binaries_doit: $(_DLLS) $(_EXES) $(_ KMODS) $(_OTHER_BINARIES)889 # This pass builds binary targets, i.e. programs, dlls, system modules and stuff. 890 pass_binaries_doit: $(_DLLS) $(_EXES) $(_SYSMODS) $(_OTHER_BINARIES) 809 891 pass := binaries 810 892 PASS := BINARIES … … 812 894 813 895 ## PASS: others 814 # This pass builds binary targets, i.e. programs, dlls, drivers and stuff.896 # This pass builds other targets. 815 897 pass_others_doit: $(_OTHERS) 816 898 pass := others … … 872 954 programs: $(_EXES) 873 955 dlls: $(_DLLS) 874 kernelmodules: $(_KMODS)956 sysmods: $(_SYSMODS) 875 957 876 958 -
trunk/kBuild/header.kmk
r78 r83 84 84 BUILD_PLATFORM := win32 85 85 endif 86 ifeq ($(BUILD_PLATFORM), WIN32)86 ifeq ($(BUILD_PLATFORM),win32) 87 87 _BUILD_PLATFORM_OK := 1 88 88 endif … … 180 180 ifeq ($(BUILD_PLATFORM),os2) 181 181 PATH_TOOLS := $(PATH_TOOLS_OS2) 182 EXEC_X86_WIN32 := $(PATH_TOOLS)/bin/innopec.exe182 EXEC_X86_WIN32 := innopec.exe 183 183 HOSTSUFF_EXE := .exe 184 184 endif -
trunk/kBuild/tools/VCC70.kmk
r82 r83 50 50 TOOL_VCC70_ASOBJSUFF := .obj 51 51 52 TOOL_VCC70_AR := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/ ar$(HOSTSUFF_EXE)52 TOOL_VCC70_AR := $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70)/bin/lib.exe 53 53 TOOL_VCC70_ARFLAGS := -nologo 54 54 TOOL_VCC70_ARLIBSUFF := .lib … … 78 78 $(TOOL_VCC70_CC) -c\ 79 79 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 80 -Fo :$$@\80 -Fo$$@\ 81 81 $(PATH_CURRENT)/$(source) 82 82 … … 102 102 $(TOOL_VCC70_CXX) -c\ 103 103 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 104 -Fo :$$@\104 -Fo$$@\ 105 105 $(PATH_CURRENT)/$(source) 106 106 … … 156 156 endef 157 157 158 159 ## Link system module (windows aka driver, linux aka kernel module) 160 # @param $(target) Normalized main target name. 161 # @param $(sys) System module name. 162 # @param $(objs) Object files to link together. 163 # @param $(libs) Libraries to search. 164 # @param $(libpath) Library search paths. 165 # @param $(flags) Flags. 166 # @param $(dirdep) Directory creation dependency. 167 # @param $(deps) Other dependencies. 168 # @param $(deffile) Definition file. (optional, PC only) 169 # @param $(custom_pre) Custom step invoked before linking. 170 # @param $(custom_post) Custom step invoked after linking. 171 # 172 # @param $(outbase) Output basename (full). Use this for list files and such. 173 define TOOL_VCC70_LINK_SYSMOD 174 $(warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) sys=$(sys) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) deffile=$(deffile) outbase=$(outbase)) 175 $(sys): $(dirdep) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(deps) 176 $(call MSG_L1,Creating Program $$@) 177 ifneq ($(custom_pre),) 178 $(eval $(custom_pre)) 179 endif 180 $(TOOL_VCC70_LD) $(flags) \ 181 /OUT:$$@ $(objs) \ 182 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib))) 183 ifneq ($(custom_post),) 184 $(eval $(custom_post)) 185 endif 186 187 endef 188
Note:
See TracChangeset
for help on using the changeset viewer.