mkspecs/features/vxworks.prf
changeset 37 758a864f9613
parent 0 1918ee327afb
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    20 # This means that for a static build only the executable is munched, while for
    20 # This means that for a static build only the executable is munched, while for
    21 # a shared build, every lib, plugin and executable is munched separately.
    21 # a shared build, every lib, plugin and executable is munched separately.
    22 
    22 
    23 shared|!staticlib:!lib {
    23 shared|!staticlib:!lib {
    24     *-dcc {
    24     *-dcc {
    25     VXWORKS_MUNCH_CMD = (targ=`basename $(TARGET)`; \
    25     VXWORKS_MUNCH_CMD =  targ=`basename $(TARGET)`; \
    26                          ddump -Ng \"$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \
    26                          ddump -Ng \"$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \
    27                          $$QMAKE_CC -c $$QMAKE_CFLAGS \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \
    27                          $$QMAKE_CC -c $$QMAKE_CFLAGS \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \
    28                          $$QMAKE_LINK $$QMAKE_LFLAGS -X -r5 -r4 \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(TARGET)\" -o \"$(TARGET).munched\" && \
    28                          $$QMAKE_LINK $$QMAKE_LFLAGS -X -r5 -r4 \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(TARGET)\" -o \"$(TARGET).munched\" && \
    29                          mv \"$(TARGET).munched\" \"$(TARGET)\" && \
    29                          mv \"$(TARGET).munched\" \"$(TARGET)\" && \
    30                          chmod +x \"$(TARGET)\")
    30                          chmod +x \"$(TARGET)\"
    31     }
    31     }
    32     *-g++ {
    32     *-g++ {
    33     VXWORKS_MUNCH_CMD = (targ=`basename $(TARGET)`; \
    33     VXWORKS_MUNCH_CMD =  targ=`basename $(TARGET)`; \
    34                          nm \"$(DESTDIR)$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \
    34                          nm \"$(DESTDIR)$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \
    35                          $$QMAKE_CC -c $$QMAKE_CFLAGS -fdollars-in-identifiers \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \
    35                          $$QMAKE_CC -c $$QMAKE_CFLAGS -fdollars-in-identifiers \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \
    36                          $$QMAKE_LINK $$QMAKE_LFLAGS -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(DESTDIR)$(TARGET)\" -o \"$(DESTDIR)$(TARGET).munched\" && \
    36                          $$QMAKE_LINK $$QMAKE_LFLAGS -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(DESTDIR)$(TARGET)\" -o \"$(DESTDIR)$(TARGET).munched\" && \
    37                          mv \"$(DESTDIR)$(TARGET).munched\" \"$(DESTDIR)$(TARGET)\" && \
    37                          mv \"$(DESTDIR)$(TARGET).munched\" \"$(DESTDIR)$(TARGET)\" && \
    38                          chmod +x \"$(DESTDIR)$(TARGET)\")
    38                          chmod +x \"$(DESTDIR)$(TARGET)\"
    39     }
    39     }
    40 
    40 
    41     # We need to create a dummy lib.a in case someone links against this lib.
    41     # We need to create a dummy lib.a in case someone links against this lib.
    42     # In VxWorks it's the responsibility of the run-time linker ld to resolve
    42     # In VxWorks it's the responsibility of the run-time linker ld to resolve
    43     # symbols, since there are no real shared libraries for the toolchain linker
    43     # symbols, since there are no real shared libraries for the toolchain linker
    46     shared:contains(TEMPLATE, lib) {
    46     shared:contains(TEMPLATE, lib) {
    47         VXWORKS_MUNCH_CMD += "&&"
    47         VXWORKS_MUNCH_CMD += "&&"
    48         VXWORKS_MUNCH_CMD += (atarg=`basename $(TARGET) .so.$${VERSION}`.a ; touch \"$(DESTDIR)\$\${atarg}\")
    48         VXWORKS_MUNCH_CMD += (atarg=`basename $(TARGET) .so.$${VERSION}`.a ; touch \"$(DESTDIR)\$\${atarg}\")
    49     }
    49     }
    50 
    50 
    51     QMAKE_POST_LINK = $$VXWORKS_MUNCH_CMD $$QMAKE_POST_LINK
    51     !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
       
    52     QMAKE_POST_LINK = $$VXWORKS_MUNCH_CMD$$QMAKE_POST_LINK
    52     silent:QMAKE_POST_LINK = @echo creating $@.$$VXWORKS_MUNCH_EXT && $$QMAKE_POST_LINK
    53     silent:QMAKE_POST_LINK = @echo creating $@.$$VXWORKS_MUNCH_EXT && $$QMAKE_POST_LINK
    53 
    54 
    54     isEmpty(DESTDIR) {
    55     isEmpty(DESTDIR) {
    55         target.targets += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT"
    56         target.targets += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT"
    56         QMAKE_DISTCLEAN += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT"
    57         QMAKE_DISTCLEAN += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT"