1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 25#+++++++++++ second_build rules +++++++++++++++++++++++++++++++++++++ 26#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 27 28.IF "$(SECOND_BUILD)"!="" 29.IF "$($(SECOND_BUILD)_OBJFILES)"!="" 30 31$(OBJ)/$(SECOND_BUILD)_%.obj : %.cxx 32 @echo "Making: " $@ 33.IF "$(GUI)"=="UNX" 34 @$(RM) $@ $(@:s/.obj/.o/) 35 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSCXXOBJ) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $(CFLAGSINCXX)$(PWD)/$*.cxx 36.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 37 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 38.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 39 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 40.ELSE 41 @$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ >& $(NULLDEV) $(FI) 42 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx 43.ENDIF 44 45$(OBJ)/$(SECOND_BUILD)_%.obj : %.c 46 @echo "Making: " $@ 47.IF "$(GUI)"=="UNX" 48.IF "$(TEST)"!="" 49 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) -E $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c 50.ELSE 51 @$(RM) $@ $(@:s/.obj/.o/) 52 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c 53.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 54 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 55.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 56 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 57.ENDIF 58.ELSE 59 @$(TYPE) $(mktmp $(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c ) 60 @echo. 61.IF "$(COM)"=="GCC" 62 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c 63.ELSE 64 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c ) 65.ENDIF 66 $(SEMADEBUG) 67.ENDIF 68 69.ENDIF # "$($(SECOND_BUILD)_OBJFILES)"!="" 70 71.IF "$($(SECOND_BUILD)_SLOFILES)"!="" 72 73$(SLO)/$(SECOND_BUILD)_%.obj : %.cxx 74 @echo "Making: " $@ 75.IF "$(GUI)"=="UNX" 76 @$(RM) $@ $(@:s/.obj/.o/) 77 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSCXXSLO) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $(CFLAGSINCXX)$(PWD)/$*.cxx 78.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 79 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 80.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 81 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 82.ELSE 83 @-$(RM) $@ 84.IF "$(COM)"=="GCC" 85 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx 86.ELSE 87 $(COMMAND_ECHO)$(CXX) @$(mktmp $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx ) 88.ENDIF 89.ENDIF 90 91$(SLO)/$(SECOND_BUILD)_%.obj : %.c 92 @echo "Making: " $@ 93.IF "$(GUI)"=="UNX" 94 @$(RM) $@ $(@:s/.obj/.o/) 95 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $*.c 96.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 97 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 98.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 99 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 100.ELSE 101 @-$(RM) $@ 102.IF "$(COM)"=="GCC" 103 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c 104.ELSE 105 $(COMMAND_ECHO)$(TYPE) $(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c ) 106 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c ) 107.ENDIF 108.ENDIF 109 110.ENDIF # "$($(SECOND_BUILD)_SLOFILES)"!="" 111.ENDIF # "$(SECOND_BUILD)"!="" 112 113#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 114#+++++++++++ srcipting rules ++++++++++++++++++++++++++++++++++++++++ 115#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 116 117.IF "$(PARFILES)"!="" 118ULFPARFILES=$(foreach,i,$(ULFFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$(i:b).par)) 119MOREPARFILES=$(foreach,i,$(PARFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$i )) 120ALLPARFILES=$(uniq $(ULFPARFILES) $(MOREPARFILES)) 121 122SCP_PRODUCT_TYPE*=FAT 123 124.IF "$(GUI)" == "WNT" 125LANGFILEEXT=mlf 126.ELSE 127LANGFILEEXT=jlf 128.ENDIF 129 130$(PAR)/%.par : 131 @echo "Making: " $@ 132 @@-$(MKDIR) $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))} 133.IF "$(GUI)"=="WNT" 134 $(COMMAND_ECHO)$(CPPLCC) -+ -P $(INCLUDE) $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre 135.ENDIF 136# YD: INCLUDE macro too long, include only few items (scp2 compile) 137.IF "$(GUI)"=="OS2" 138 $(CPPLCC) -+ -P -I../../inc -I../../os2gcci.pro/inc $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre 139.ENDIF 140.IF "$(GUI)"=="UNX" 141 $(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cpp.lcc -+ -P $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) -I. -I$(INC) -I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre 142.ENDIF 143.IF "$(common_build_srs)"!="" 144 $(COMMAND_ECHO)$(SCPCOMP) -l {$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 145.ELSE # "$(common_build_srs)"!="" 146 $(COMMAND_ECHO)$(SCPCOMP) -l {$(MISC)/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 147.ENDIF # "$(common_build_srs)"!="" 148# hacked version 149# $(COMMAND_ECHO)$(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 150 151.ENDIF # "$(PARFILES)"!="" 152