xref: /aoo41x/main/solenv/inc/pstrules.mk (revision 534c536d)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
25cdf0e10cSrcweir#+++++++++++	second_build rules			+++++++++++++++++++++++++++++++++++++
26cdf0e10cSrcweir#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
27cdf0e10cSrcweir
28cdf0e10cSrcweir.IF "$(SECOND_BUILD)"!=""
29cdf0e10cSrcweir.IF "$($(SECOND_BUILD)_OBJFILES)"!=""
30cdf0e10cSrcweir
31cdf0e10cSrcweir$(OBJ)/$(SECOND_BUILD)_%.obj : %.cxx
32cdf0e10cSrcweir	@echo "Making:   " $@
33cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
34cdf0e10cSrcweir	@$(RM) $@ $(@:s/.obj/.o/)
35cdf0e10cSrcweir	$(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
36cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
37cdf0e10cSrcweir    $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
38cdf0e10cSrcweir.ENDIF          # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
39cdf0e10cSrcweir	@$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
40cdf0e10cSrcweir.ELSE
41cdf0e10cSrcweir	@$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ >& $(NULLDEV) $(FI)
42cdf0e10cSrcweir	$(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
43cdf0e10cSrcweir.ENDIF
44cdf0e10cSrcweir
45cdf0e10cSrcweir$(OBJ)/$(SECOND_BUILD)_%.obj : %.c
46cdf0e10cSrcweir	@echo "Making:   " $@
47cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
48cdf0e10cSrcweir.IF "$(TEST)"!=""
49cdf0e10cSrcweir	$(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) -E $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c
50cdf0e10cSrcweir.ELSE
51cdf0e10cSrcweir	@$(RM) $@ $(@:s/.obj/.o/)
52cdf0e10cSrcweir	$(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c
53cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
54cdf0e10cSrcweir    $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
55cdf0e10cSrcweir.ENDIF          # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
56cdf0e10cSrcweir	@$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
57cdf0e10cSrcweir.ENDIF
58cdf0e10cSrcweir.ELSE
59cdf0e10cSrcweir	@$(TYPE) $(mktmp $(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
60cdf0e10cSrcweir	@echo.
61cdf0e10cSrcweir.IF "$(COM)"=="GCC"
62cdf0e10cSrcweir	$(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c
63cdf0e10cSrcweir.ELSE
64cdf0e10cSrcweir	$(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
65cdf0e10cSrcweir.ENDIF
66cdf0e10cSrcweir	$(SEMADEBUG)
67cdf0e10cSrcweir.ENDIF
68cdf0e10cSrcweir
69cdf0e10cSrcweir.ENDIF			# "$($(SECOND_BUILD)_OBJFILES)"!=""
70cdf0e10cSrcweir
71cdf0e10cSrcweir.IF "$($(SECOND_BUILD)_SLOFILES)"!=""
72cdf0e10cSrcweir
73cdf0e10cSrcweir$(SLO)/$(SECOND_BUILD)_%.obj : %.cxx
74cdf0e10cSrcweir	@echo "Making:   " $@
75cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
76cdf0e10cSrcweir	@$(RM) $@ $(@:s/.obj/.o/)
77cdf0e10cSrcweir	$(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
78cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
79cdf0e10cSrcweir    $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
80cdf0e10cSrcweir.ENDIF          # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
81cdf0e10cSrcweir	@$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
82cdf0e10cSrcweir.ELSE
83cdf0e10cSrcweir	@-$(RM) $@
84cdf0e10cSrcweir.IF "$(COM)"=="GCC"
85cdf0e10cSrcweir	$(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
86cdf0e10cSrcweir.ELSE
87cdf0e10cSrcweir	$(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 )
88cdf0e10cSrcweir.ENDIF
89cdf0e10cSrcweir.ENDIF
90cdf0e10cSrcweir
91cdf0e10cSrcweir$(SLO)/$(SECOND_BUILD)_%.obj :  %.c
92cdf0e10cSrcweir	@echo "Making:   " $@
93cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
94cdf0e10cSrcweir	@$(RM) $@ $(@:s/.obj/.o/)
95cdf0e10cSrcweir	$(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $*.c
96cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
97cdf0e10cSrcweir    $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
98cdf0e10cSrcweir.ENDIF          # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
99cdf0e10cSrcweir	@$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
100cdf0e10cSrcweir.ELSE
101cdf0e10cSrcweir	@-$(RM) $@
102cdf0e10cSrcweir.IF "$(COM)"=="GCC"
103cdf0e10cSrcweir	   $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c
104cdf0e10cSrcweir.ELSE
105cdf0e10cSrcweir	   $(COMMAND_ECHO)$(TYPE) $(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c )
106cdf0e10cSrcweir	   $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c )
107cdf0e10cSrcweir.ENDIF
108cdf0e10cSrcweir.ENDIF
109cdf0e10cSrcweir
110cdf0e10cSrcweir.ENDIF			# "$($(SECOND_BUILD)_SLOFILES)"!=""
111cdf0e10cSrcweir.ENDIF			# "$(SECOND_BUILD)"!=""
112cdf0e10cSrcweir
113cdf0e10cSrcweir#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
114cdf0e10cSrcweir#+++++++++++	srcipting rules		++++++++++++++++++++++++++++++++++++++++
115cdf0e10cSrcweir#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
116cdf0e10cSrcweir
117cdf0e10cSrcweir.IF "$(PARFILES)"!=""
118cdf0e10cSrcweirULFPARFILES=$(foreach,i,$(ULFFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$(i:b).par))
119cdf0e10cSrcweirMOREPARFILES=$(foreach,i,$(PARFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$i ))
120cdf0e10cSrcweirALLPARFILES=$(uniq $(ULFPARFILES) $(MOREPARFILES))
121cdf0e10cSrcweir
122cdf0e10cSrcweirSCP_PRODUCT_TYPE*=FAT
123cdf0e10cSrcweir
124cdf0e10cSrcweir.IF "$(GUI)" == "WNT"
125cdf0e10cSrcweirLANGFILEEXT=mlf
126cdf0e10cSrcweir.ELSE
127cdf0e10cSrcweirLANGFILEEXT=jlf
128cdf0e10cSrcweir.ENDIF
129cdf0e10cSrcweir
130cdf0e10cSrcweir$(PAR)/%.par :
131cdf0e10cSrcweir	@echo "Making:   " $@
132cdf0e10cSrcweir	@@-$(MKDIR) $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}
133cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
134cdf0e10cSrcweir	$(COMMAND_ECHO)$(CPPLCC) -+ -P $(INCLUDE) $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre
135cdf0e10cSrcweir.ENDIF
136cdf0e10cSrcweir# YD: INCLUDE macro too long, include only few items (scp2 compile)
137cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
138*534c536dSYuri Dario	$(CPPLCC) -+ -P -I../../inc -I../../os2gcci.pro/inc $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
139cdf0e10cSrcweir.ENDIF
140cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
141cdf0e10cSrcweir	$(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
142cdf0e10cSrcweir.ENDIF
143cdf0e10cSrcweir.IF "$(common_build_srs)"!=""
144cdf0e10cSrcweir	$(COMMAND_ECHO)$(SCPCOMP) -l {$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
145cdf0e10cSrcweir.ELSE          # "$(common_build_srs)"!=""
146cdf0e10cSrcweir	$(COMMAND_ECHO)$(SCPCOMP) -l {$(MISC)/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
147cdf0e10cSrcweir.ENDIF          # "$(common_build_srs)"!=""
148cdf0e10cSrcweir# hacked version
149cdf0e10cSrcweir#    $(COMMAND_ECHO)$(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
150cdf0e10cSrcweir
151cdf0e10cSrcweir.ENDIF			# "$(PARFILES)"!=""
152