Changeset 130 for trunk/kBuild/footer.kmk
- Timestamp:
- Jun 29, 2004, 7:30:14 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r127 r130 658 658 $(eval publib := $(PATH_LIB)/$(notdir $(lib))) 659 659 $(publib) : $(lib) $(dir $(publib)).dir_created 660 $(CP) $(lib) $(publib) 660 $(CP) $(lib) $(publib) 661 661 662 662 _LIBS += $(publib) … … 778 778 $(eval deps := ) 779 779 # 780 $(eval deffile := $(strip $(firstword781 $($(target)_DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\782 $($(target)_DEFFILE.$(BUILD_TARGET))\783 $($(target)_DEFFILE.$(BUILD_TYPE))\784 $($(target)_DEFFILE)\785 $(DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\786 $(DEFFILE.$(BUILD_TARGET))\787 $(DEFFILE.$(BUILD_TYPE))\788 $(DEFFILE)\789 )))790 780 $(eval custom_pre := $(strip $(firstword 791 781 $($(target)_CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ … … 811 801 812 802 $(eval $(TOOL_$(tool)_LINK_PROGRAM)) 813 803 # publish rule (still need work) 804 ifndef $(target)_noinst 805 $(eval pubexe := $(PATH_LIB)/$(notdir $(exe))) 806 $(pubexe) : $(exe) $(dir $(pubexe)).dir_created 807 $(CP) $(exe) $(pubexe) 808 809 _DLLS += $(pubexe) 810 _OUT_FILES += $(exe) $(pubexe) 811 else 812 _DLLS += $(exe) 813 _OUT_FILES += $(exe) 814 endif 814 815 _OBJS += $(_OBJS_$(target)) 815 _EXES += $(exe)816 _OUT_FILES += $(exe)817 816 endef 818 817 … … 826 825 # 827 826 827 ## DLL (one). 828 # @param $(target) Normalized target (program) name. 829 define def_dll 830 # source -> object 831 $(eval $(def_target_sources)) 832 833 # dllmod 834 $(eval tool := $(call _TARGET_TOOL,$(target),LD)) 835 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 836 $(eval PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))) 837 $(eval dllsuff := $(firstword $($(target)_DLLSUFF) $($(target)_DLLSUFF) $(TOOL_$(tool)_LDDLLSUFF) $(SUFF_DLL))) 838 $(eval dll := $(outbase)$(dllsuff)) 839 $(eval objs = $(_OBJS_$(target))) 840 $(eval flags :=\ 841 $(TOOL_$(tool)_LDFLAGS)\ 842 $(TOOL_$(tool)_LDFLAGS.$(BUILD_TYPE))\ 843 $(TOOL_$(tool)_LDFLAGS.$(BUILD_TARGET))\ 844 $(TOOL_$(tool)_LDFLAGS.$(BUILD_TARGET_ARCH))\ 845 $(TOOL_$(tool)_LDFLAGS.$(BUILD_TARGET_CPU))\ 846 $(LDFLAGS)\ 847 $(LDFLAGS.$(BUILD_TYPE))\ 848 $(LDFLAGS.$(BUILD_TARGET))\ 849 $(LDFLAGS.$(BUILD_TARGET_ARCH))\ 850 $(LDFLAGS.$(BUILD_TARGET_CPU))\ 851 $($(target)_LDFLAGS)\ 852 $($(target)_LDFLAGS.$(BUILD_TYPE))\ 853 $($(target)_LDFLAGS.$(BUILD_TARGET))\ 854 $($(target)_LDFLAGS.$(BUILD_TARGET_ARCH))\ 855 $($(target)_LDFLAGS.$(BUILD_TARGET_CPU))\ 856 ) 857 $(eval libs :=\ 858 $($(target)_LIBS.$(BUILD_TARGET_CPU))\ 859 $($(target)_LIBS.$(BUILD_TARGET_ARCH))\ 860 $($(target)_LIBS.$(BUILD_TARGET))\ 861 $($(target)_LIBS.$(BUILD_TYPE))\ 862 $($(target)_LIBS)\ 863 $(foreach sdk, $($(target)_SDKS.$(BUILD_TARGET)) \ 864 $($(target)_SDKS.$(BUILD_TYPE)) \ 865 $($(target)_SDKS),\ 866 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET_CPU))\ 867 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET_ARCH))\ 868 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET))\ 869 $(SDK_$(sdk)_LIBS.$(BUILD_TYPE))\ 870 $(SDK_$(sdk)_LIBS))\ 871 $(LIBS.$(BUILD_TARGET_CPU))\ 872 $(LIBS.$(BUILD_TARGET_ARCH))\ 873 $(LIBS.$(BUILD_TARGET))\ 874 $(LIBS.$(BUILD_TYPE))\ 875 $(LIBS)\ 876 $(foreach sdk, $(SDKS.$(BUILD_TARGET)) \ 877 $(SDKS.$(BUILD_TYPE)) \ 878 $(SDKS),\ 879 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET_CPU))\ 880 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET_ARCH))\ 881 $(SDK_$(sdk)_LIBS.$(BUILD_TARGET))\ 882 $(SDK_$(sdk)_LIBS.$(BUILD_TYPE))\ 883 $(SDK_$(sdk)_LIBS))\ 884 $(TOOL_$(tool)_LIBS.$(BUILD_TARGET_CPU))\ 885 $(TOOL_$(tool)_LIBS.$(BUILD_TARGET_ARCH))\ 886 $(TOOL_$(tool)_LIBS.$(BUILD_TARGET))\ 887 $(TOOL_$(tool)_LIBS.$(BUILD_TYPE))\ 888 $(TOOL_$(tool)_LIBS)\ 889 ) 890 $(eval libpath :=\ 891 $($(target)_LIBPATH.$(BUILD_TARGET_CPU))\ 892 $($(target)_LIBPATH.$(BUILD_TARGET_ARCH))\ 893 $($(target)_LIBPATH.$(BUILD_TARGET))\ 894 $($(target)_LIBPATH.$(BUILD_TYPE))\ 895 $($(target)_LIBPATH)\ 896 $(foreach sdk, $($(target)_SDKS.$(BUILD_TARGET)) \ 897 $($(target)_SDKS.$(BUILD_TYPE)) \ 898 $($(target)_SDKS),\ 899 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET_CPU))\ 900 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET_ARCH))\ 901 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET))\ 902 $(SDK_$(sdk)_LIBPATH.$(BUILD_TYPE))\ 903 $(SDK_$(sdk)_LIBPATH))\ 904 $(LIBPATH.$(BUILD_TARGET_CPU))\ 905 $(LIBPATH.$(BUILD_TARGET_ARCH))\ 906 $(LIBPATH.$(BUILD_TARGET))\ 907 $(LIBPATH.$(BUILD_TYPE))\ 908 $(LIBPATH)\ 909 $(foreach sdk, $(SDKS.$(BUILD_TARGET)) \ 910 $(SDKS.$(BUILD_TYPE)) \ 911 $(SDKS),\ 912 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET_CPU))\ 913 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET_ARCH))\ 914 $(SDK_$(sdk)_LIBPATH.$(BUILD_TARGET))\ 915 $(SDK_$(sdk)_LIBPATH.$(BUILD_TYPE))\ 916 $(SDK_$(sdk)_LIBPATH))\ 917 $(TOOL_$(tool)_LIBPATH.$(BUILD_TARGET_CPU))\ 918 $(TOOL_$(tool)_LIBPATH.$(BUILD_TARGET_ARCH))\ 919 $(TOOL_$(tool)_LIBPATH.$(BUILD_TARGET))\ 920 $(TOOL_$(tool)_LIBPATH.$(BUILD_TYPE))\ 921 $(TOOL_$(tool)_LIBPATH)\ 922 ) 923 $(eval dirdep := $(dir $(dll)).dir_created) 924 ## @todo fix dependencies 925 $(eval deps := ) 926 # 927 $(eval custom_pre := $(strip $(firstword 928 $($(target)_CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ 929 $($(target)_CUSTOM_PRE.$(BUILD_TARGET))\ 930 $($(target)_CUSTOM_PRE.$(BUILD_TYPE))\ 931 $($(target)_CUSTOM_PRE)\ 932 $(CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ 933 $(CUSTOM_PRE.$(BUILD_TARGET))\ 934 $(CUSTOM_PRE.$(BUILD_TYPE))\ 935 $(CUSTOM_PRE)\ 936 ))) 937 $(eval custom_post := $(strip $(firstword 938 $($(target)_CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\ 939 $($(target)_CUSTOM_POST.$(BUILD_TARGET))\ 940 $($(target)_CUSTOM_POST.$(BUILD_TYPE))\ 941 $($(target)_CUSTOM_POST)\ 942 $(CUSTOM_POST.$(BUILD_TARGET).$(BUILD_TYPE))\ 943 $(CUSTOM_POST.$(BUILD_TARGET))\ 944 $(CUSTOM_POST.$(BUILD_TYPE))\ 945 $(CUSTOM_POST)\ 946 ))) 947 $(eval othersrc := $(filter-out %.c %.cpp %.cxx %.cc %.s %.S %.asm,$($(target)_SOURCES) $($(target)_SOURCES.$(BUILD_TARGET)) $($(target)_SOURCES.$(BUILD_MODE)))) 948 949 ifndef TOOL_$(tool)_LINK_DLL 950 $$(warning kBuild: TOOL_$(tool)_LINK_DLL is not defined. target=$(target) ) 951 $$(warning kBuild: tools: \ 952 1 $($(target)_$(source)TOOL.$(BUILD_TARGET)) \ 953 2 $($(target)_$(source)TOOL) \ 954 3 $($(target)_TOOL.$(BUILD_TARGET)) \ 955 4 $($(target)_TOOL) \ 956 5 $($(source)TOOL) \ 957 6 $($(source)TOOL.$(BUILD_TARGET)) \ 958 7 $(TOOL.$(BUILD_TARGET)) \ 959 8 $(TOOL) ) 960 endif 961 962 $(eval $(TOOL_$(tool)_LINK_DLL)) 963 964 965 # publish rule (still need work) 966 ifndef $(target)_noinst 967 $(eval pubdll := $(PATH_LIB)/$(notdir $(dll))) 968 $(pubdll) : $(dll) $(dir $(pubdll)).dir_created 969 $(CP) $(dll) $(pubdll) 970 971 _DLLS += $(pubdll) 972 _OUT_FILES += $(dll) $(pubdll) 973 else 974 _DLLS += $(dll) 975 _OUT_FILES += $(dll) 976 endif 977 _OBJS += $(_OBJS_$(target)) 978 endef 979 980 # Process dlls 981 $(foreach target, $(DLLS), $(eval $(def_dll))) 828 982 829 983 … … 832 986 # 833 987 834 ## System module r(one).988 ## System module (one). 835 989 # @param $(target) Normalized target (program) name. 836 990 define def_sysmod … … 932 1086 $(eval deps := ) 933 1087 # 934 $(eval deffile := $(strip $(firstword935 $($(target)_DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\936 $($(target)_DEFFILE.$(BUILD_TARGET))\937 $($(target)_DEFFILE.$(BUILD_TYPE))\938 $($(target)_DEFFILE)\939 $(DEFFILE.$(BUILD_TARGET).$(BUILD_TYPE))\940 $(DEFFILE.$(BUILD_TARGET))\941 $(DEFFILE.$(BUILD_TYPE))\942 $(DEFFILE)\943 )))944 1088 $(eval custom_pre := $(strip $(firstword 945 1089 $($(target)_CUSTOM_PRE.$(BUILD_TARGET).$(BUILD_TYPE))\ … … 979 1123 $(eval $(TOOL_$(tool)_LINK_SYSMOD)) 980 1124 981 _OBJS += $(_OBJS_$(target)) 1125 # publish rule (still need work) 1126 ifndef $(target)_noinst 1127 $(eval pubsys := $(PATH_LIB)/$(notdir $(sys))) 1128 $(pubsys) : $(sys) $(dir $(pubsys)).dir_created 1129 $(CP) $(sys) $(pubsys) 1130 1131 _SYSMODS += $(pubsys) 1132 _OUT_FILES += $(sys) $(pubsys) 1133 else 982 1134 _SYSMODS += $(sys) 983 1135 _OUT_FILES += $(sys) 984 endef 985 986 # Process libraries 1136 endif 1137 _OBJS += $(_OBJS_$(target)) 1138 endef 1139 1140 # Process sysmods 987 1141 $(foreach target, $(SYSMODS), $(eval $(def_sysmod))) 988 1142 … … 1003 1157 # Directories. 1004 1158 # 1005 _DIRFILES := $(sort $(addsuffix /.dir_created,$(_DIRS)) $(addsuffix .dir_created,$( dir $(_OUT_FILES) $(_OBJS))))1159 _DIRFILES := $(sort $(addsuffix /.dir_created,$(_DIRS)) $(addsuffix .dir_created,$(sort $(dir $(_OUT_FILES) $(_OBJS))))) 1006 1160 1007 1161 define def_createdir … … 1155 1309 all_recursive: $(foreach pass,$(PASSES),pass_$(pass)) 1156 1310 1157 rebuild: clean 1311 rebuild: clean 1158 1312 $(MAKE) -f $(firstword $(MAKEFILE_LIST)) all_recursive 1159 1313
Note:
See TracChangeset
for help on using the changeset viewer.