diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-09-07 13:35:07 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-09-07 13:35:07 +0000 |
commit | ae0228cdb340de85f42c25024986ce0e557503a3 (patch) | |
tree | 55439cdf267c7cd8eef9a0ce6fa0c1775b3a133f /solenv/inc/tg_app.mk | |
parent | 9d7d35bce00ec0b2676d0428872300cc257e3288 (diff) |
CWS-TOOLING: integrate CWS kick4nt
Diffstat (limited to 'solenv/inc/tg_app.mk')
-rw-r--r-- | solenv/inc/tg_app.mk | 112 |
1 files changed, 50 insertions, 62 deletions
diff --git a/solenv/inc/tg_app.mk b/solenv/inc/tg_app.mk index efffc86156c3..423b73b99530 100644 --- a/solenv/inc/tg_app.mk +++ b/solenv/inc/tg_app.mk @@ -34,7 +34,7 @@ # unroll begin .IF "$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI" -APP$(TNR)DEF = $(MISC)$/$(APP$(TNR)TARGET).def +APP$(TNR)DEF = $(MISC)/$(APP$(TNR)TARGET).def .ENDIF .IF "$(APP$(TNR)LINKTYPE)" != "" @@ -76,7 +76,7 @@ APP$(TNR)OBJS+= $(STDOBJVCL) .IF "$(GUI)$(COM)" == "WNTGCC" APP$(TNR)RESO= .IF "$(APP$(TNR)LINKRES)" != "" || "$(APP$(TNR)RES)" != "" -APP$(TNR)RESO=$(MISC)$/$(APP$(TNR)TARGET:b)_res.o +APP$(TNR)RESO=$(MISC)/$(APP$(TNR)TARGET:b)_res.o .ENDIF .ENDIF @@ -94,13 +94,13 @@ APP$(TNR)PRODUCTDEF:=-DPRODUCT_NAME=\"$(APP$(TNR)PRODUCTNAME)\" .IF "$(linkinc)"!="" .IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" .IF "$(APP$(TNR)LIBS)"!="" -$(MISC)$/$(APP$(TNR)TARGET)_linkinc.ls .PHONY: +$(MISC)/$(APP$(TNR)TARGET)_linkinc.ls .PHONY: @@-$(RM) $@ - sed -f $(SOLARENV)$/bin$/chrel.sed $(foreach,i,$(APP$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@ + sed -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(APP$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@ .ENDIF #"$(APP$(TNR)LIBS)"!="" .ENDIF -LINKINCTARGETS+=$(MISC)$/$(APP$(TNR)TARGETN:b)_linkinc.ls +LINKINCTARGETS+=$(MISC)/$(APP$(TNR)TARGETN:b)_linkinc.ls $(APP$(TNR)TARGETN) : $(LINKINCTARGETS) .ENDIF # "$(linkinc)"!="" @@ -108,7 +108,7 @@ $(APP$(TNR)TARGETN) : $(LINKINCTARGETS) APP$(TNR)LIBSALCPPRT*=$(LIBSALCPPRT) .IF "$(GUI)" == "OS2" -_APP$(TNR)IMP_ORD = $(APP$(TNR)STDLIBS:^"$(SOLARVERSION)$/$(INPATH)$/lib$/") $(APP$(TNR)STDLIBS:^"$(LB)$/") +_APP$(TNR)IMP_ORD = $(APP$(TNR)STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(APP$(TNR)STDLIBS:^"$(LB)/") APP$(TNR)IMP_ORD = $(foreach,i,$(_APP$(TNR)IMP_ORD) $(shell @-ls $i)) .ELSE APP$(TNR)IMP_ORD = @@ -123,24 +123,24 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ .IF "$(GUI)"=="UNX" .IF "$(OS)"=="MACOSX" @echo unx - @-$(RM) $(MISC)$/$(@:b).list - @-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @-$(RM) $(MISC)$/$(@:b).strip + @-$(RM) $(MISC)/$(@:b).list + @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @-$(RM) $(MISC)/$(@:b).strip @echo $(STDSLO) $(APP$(TNR)OBJS:s/.obj/.o/) \ - `cat /dev/null $(APP$(TNR)LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr -s " " "\n" > $(MISC)$/$(@:b).list - @echo -n $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) -o $@ \ - $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -filelist $(MISC)$/$(@:b).list > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @$(PERL) $(SOLARENV)$/bin$/macosx-dylib-link-list.pl \ - `cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd` \ - >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + `cat /dev/null $(APP$(TNR)LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list + @echo -n $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) -o $@ \ + $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -filelist $(MISC)/$(@:b).list > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \ + `cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd` \ + >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd # Need to strip __objcInit symbol to avoid duplicate symbols when loading # libraries at runtime - @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x '__objcInit' > $(MISC)$/$(@:b).strip - @strip -i -R $(MISC)$/$(@:b).strip -X $@ + @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x '__objcInit' > $(MISC)/$(@:b).strip + @strip -i -R $(MISC)/$(@:b).strip -X $@ @ls -l $@ - @$(PERL) $(SOLARENV)$/bin$/macosx-change-install-names.pl \ + @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \ app $(APP$(TNR)RPATH) $@ .IF "$(TARGETTYPE)"=="GUI" @echo "Making: $@.app" @@ -148,44 +148,44 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ .ENDIF # "$(TARGETTYPE)"=="GUI" .ELSE # "$(OS)"=="MACOSX" @echo unx - @-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @echo $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ - $(APP$(TNR)OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @echo $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @echo $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) $(STDSLO) \ + $(APP$(TNR)OBJS:s/.obj/.o/) '\' > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @echo $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -o $@ >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd @ls -l $@ .ENDIF # "$(OS)"=="MACOSX" .ENDIF .IF "$(GUI)" == "WNT" @@-$(MKDIR) $(@:d:d) .IF "$(APP$(TNR)LINKRES)" != "" - @@-$(RM) $(MISC)$/$(APP$(TNR)LINKRES:b).rc + @@-$(RM) $(MISC)/$(APP$(TNR)LINKRES:b).rc .IF "$(APP$(TNR)ICON)" != "" - @-echo 1 ICON $(EMQ)"$(APP$(TNR)ICON:s/\/\\/)$(EMQ)" >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc + @-echo 1 ICON $(EMQ)"$(APP$(TNR)ICON:s/\/\\/)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)ICON)" != "" .IF "$(APP$(TNR)VERINFO)" != "" - @-echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc - @-echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc + @-echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP$(TNR)LINKRES:b).rc + @-echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)VERINFO)" != "" - $(RC) -DWIN32 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)$/$(APP$(TNR)LINKRES:b).rc + $(RC) -DWIN32 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)LINKRES)" != "" .IF "$(COM)" == "GCC" @echo mingw .IF "$(APP$(TNR)LINKRES)" != "" || "$(APP$(TNR)RES)" != "" - @cat $(APP$(TNR)LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP$(TNR)RES)) > $(MISC)$/$(@:b)_all.res - windres $(MISC)$/$(@:b)_all.res $(APP$(TNR)RESO) + @cat $(APP$(TNR)LINKRES) $(subst,/res/,/res{$(subst,$(BIN), $(@:d))} $(APP$(TNR)RES)) > $(MISC)/$(@:b)_all.res + windres $(MISC)/$(@:b)_all.res $(APP$(TNR)RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) $(STDSLO) \ $(APP$(TNR)BASEX) $(APP$(TNR)STACKN) -o $@ $(APP$(TNR)OBJS) \ - -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP$(TNR)RESO) \ + -Wl,-Map,$(MISC)/$(@:b).map $(STDOBJ) $(APP$(TNR)RESO) \ `$(TYPE) /dev/null $(APP$(TNR)LIBS) | sed s#$(ROUT)#$(OUT)#g` \ $(APP_LINKTYPE) $(APP$(TNR)LIBSALCPPRT) \ -Wl,--start-group $(APP$(TNR)STDLIBS) -Wl,--end-group $(APP$(TNR)STDLIB) \ - $(STDLIB$(TNR)) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd - @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + $(STDLIB$(TNR)) $(MINGWSSTDENDOBJ) > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @$(TYPE) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd + @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd @ls -l $@ .ELSE # "$(COM)" == "GCC" .IF "$(linkinc)" == "" @@ -194,7 +194,7 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ $(LINKFLAGSAPP) $(APP$(TNR)BASEX) \ $(APP$(TNR)STACKN) \ -out:$@ \ - -map:$(MISC)$/{$(subst,$/,_ $(APP$(TNR)TARGET)).map} \ + -map:$(MISC)/{$(subst,/,_ $(APP$(TNR)TARGET)).map} \ $(STDOBJ) \ $(APP$(TNR)LINKRES) \ $(APP$(TNR)RES) \ @@ -205,7 +205,7 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ ) @-echo linking $@.manifest ... .IF "$(VISTA_MANIFEST)"!="" - $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)$/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) + $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);1 $(FI) .ELSE $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);1 $(FI) @@ -230,17 +230,13 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ $(APP$(TNR)STDLIBS) \ $(APP$(TNR)STDLIB) $(STDLIB$(TNR))) $(SED) -e 's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC)\$(APP$(TNR)TARGETN:b)_linkobj.lst >> $(MISC)\$(APP$(TNR)TARGET).lst - $(IFEXIST) $(MISC)$/$(APP$(TNR)TARGET).lst $(THEN) type $(MISC)$/$(APP$(TNR)TARGET).lst >> $(MISC)$/$(APP$(TNR)TARGET).lnk $(FI) + $(IFEXIST) $(MISC)/$(APP$(TNR)TARGET).lst $(THEN) type $(MISC)/$(APP$(TNR)TARGET).lst >> $(MISC)/$(APP$(TNR)TARGET).lnk $(FI) $(APP$(TNR)LINKER) @$(MISC)\$(APP$(TNR)TARGET).lnk .ENDIF # "$(linkinc)" == "" .ENDIF # "$(COM)" == "GCC" .IF "$(APP$(TNR)TARGET)" == "loader" $(PERL) loader.pl $@ -.IF "$(USE_SHELL)"=="4nt" - $(COPY) /b $(@)+$(@:d)unloader.exe $(@:d)_new.exe -.ELSE # "$(USE_SHELL)"=="4nt" $(TYPE) $(@) $(@:d)unloader.exe > $(@:d)_new.exe -.ENDIF # "$(USE_SHELL)"=="4nt" $(RM) $@ $(RENAME) $(@:d)_new.exe $(@:d)loader.exe .ENDIF # "$(TARGET)" == "setup" @@ -250,23 +246,19 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ .IF "$(GUI)" == "OS2" @+-$(MKDIR) $(@:d:d) >& $(NULLDEV) .IF "$(APP$(TNR)LINKRES)" != "" - @+-$(RM) $(MISC)$/$(APP$(TNR)LINKRES:b).rc >& $(NULLDEV) + @+-$(RM) $(MISC)/$(APP$(TNR)LINKRES:b).rc >& $(NULLDEV) .IF "$(APP$(TNR)ICON)" != "" -.IF "$(USE_SHELL)"=="4nt" - @-+echo ICON 1 "$(APP$(TNR)ICON:s/\/\\/)" >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc -.ELSE # "$(USE_SHELL)"=="4nt" - @-+$(WRAPCMD) echo 1 ICON $(EMQ)"$(APP$(TNR)ICON)$(EMQ)" | $(SED) 'sX\\X\\\\Xg' >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc -.ENDIF # "$(USE_SHELL)"=="4nt" + @-+$(WRAPCMD) echo 1 ICON $(EMQ)"$(APP$(TNR)ICON)$(EMQ)" | $(SED) 'sX\\X\\\\Xg' >> $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)ICON)" != "" .IF "$(APP$(TNR)VERINFO)" != "" - @-+echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc - @-+echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc + @-+echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP$(TNR)LINKRES:b).rc + @-+echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)VERINFO)" != "" - $(RC) -r -DOS2 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)$/$(APP$(TNR)LINKRES:b).rc + $(RC) -r -DOS2 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(APP$(TNR)LINKRES:b).rc .ENDIF # "$(APP$(TNR)LINKRES)" != "" .IF "$(TARGETTYPE)" == "GUI" - @echo NAME $(APP$(TNR)TARGET) WINDOWAPI > $(MISC)$/$(APP$(TNR)TARGET).def + @echo NAME $(APP$(TNR)TARGET) WINDOWAPI > $(MISC)/$(APP$(TNR)TARGET).def .ENDIF @+echo $(APP$(TNR)LINKFLAGS) \ @@ -274,7 +266,7 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ $(APP$(TNR)STACKN) \ -o $@ \ -Zmap -L$(LB) \ - -L$(SOLARVERSION)$/$(INPATH)$/lib \ + -L$(SOLARVERSION)/$(INPATH)/lib \ $(STDOBJ) \ $(APP$(TNR)LINKRES) \ $(APP$(TNR)RES) \ @@ -289,7 +281,7 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ $(APP$(TNR)STACKN) \ -o $@ \ -Zmap -L$(LB) \ - -L$(SOLARVERSION)$/$(INPATH)$/lib \ + -L$(SOLARVERSION)/$(INPATH)/lib \ $(STDOBJ) \ $(APP$(TNR)LINKRES) \ $(APP$(TNR)RES) \ @@ -302,11 +294,7 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ .IF "$(APP$(TNR)TARGET)" == "loader" +$(PERL) loader.pl $@ -.IF "$(USE_SHELL)"=="4nt" - +$(COPY) /b $(@)+$(@:d)unloader.exe $(@:d)_new.exe -.ELSE # "$(USE_SHELL)"=="4nt" +$(TYPE) $(@) $(@:d)unloader.exe > $(@:d)_new.exe -.ENDIF # "$(USE_SHELL)"=="4nt" +$(RM) $@ +$(RENAME) $(@:d)_new.exe $(@:d)loader.exe .ENDIF # "$(TARGET)" == "setup" |