Changeset b501de7 in mainline


Ignore:
Timestamp:
2018-11-26T13:55:51Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b555f0f
Parents:
5aa06ad
git-author:
Jiri Svoboda <jiri@…> (2018-11-25 17:54:21)
git-committer:
Jiri Svoboda <jiri@…> (2018-11-26 13:55:51)
Message:

XCW should rely on export dir instead of touching the source tree. Allow specifying alternate export dir. Add more exported libraries (yes, I know).

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tools/xcw/bin/helenos-bld-config

    r5aa06ad rb501de7  
    3333
    3434SRC_ROOT="$(dirname "$0")/../../.."
    35 MAKEFILE_COMMON="$SRC_ROOT"/Makefile.common
    36 MAKEFILE_CONFIG="$SRC_ROOT"/Makefile.config
    37 CONFIG_MK="$SRC_ROOT"/uspace/export/config.mk
     35if [ -z "$EXPORT_DIR" ]; then
     36        EXPORT_DIR="$SRC_ROOT/uspace/export"
     37fi
     38MAKEFILE_COMMON="$EXPORT_DIR"/Makefile.common
     39MAKEFILE_CONFIG="$EXPORT_DIR"/Makefile.config
     40CONFIG_MK="$EXPORT_DIR"/config.mk
    3841
    3942# Extract simple 'name = value' variable definition from Makefile
  • tools/xcw/bin/helenos-cc

    r5aa06ad rb501de7  
    3434XCW="$(dirname "$0")"
    3535SRC_ROOT="$XCW/../../.."
     36if [ -z "$EXPORT_DIR" ]; then
     37        EXPORT_DIR="$SRC_ROOT/uspace/export"
     38fi
    3639UARCH="$("$XCW"/helenos-bld-config --uarch)"
    3740CC="$("$XCW"/helenos-bld-config --cc)"
     
    4952    "$@" \
    5053    -I"$XCW"/../include \
    51     -I"$SRC_ROOT"/uspace/lib/c/include \
    52     -I"$SRC_ROOT"/abi/include \
    53     -I"$SRC_ROOT"/uspace/lib/c/arch/"$UARCH"/include
     54    -I"$EXPORT_DIR"/include/libc \
     55    -I"$EXPORT_DIR"/include
  • tools/xcw/bin/helenos-ld

    r5aa06ad rb501de7  
    3434XCW="$(dirname "$0")"
    3535SRC_ROOT="$XCW/../../.."
     36if [ -z "$EXPORT_DIR" ]; then
     37        EXPORT_DIR="$SRC_ROOT/uspace/export"
     38fi
    3639UARCH="$("$XCW"/helenos-bld-config --uarch)"
    3740CFLAGS="$("$XCW"/helenos-bld-config --cflags)"
     
    4346    $CFLAGS \
    4447    "$@" \
    45     "$SRC_ROOT"/uspace/lib/c/crt0.o \
    46     "$SRC_ROOT"/uspace/lib/c/crt1.o \
    47     "$SRC_ROOT"/uspace/lib/c/libc.a \
     48    "$EXPORT_DIR"/lib/crt0.o \
     49    "$EXPORT_DIR"/lib/crt1.o \
     50    "$EXPORT_DIR"/lib/libc.a \
    4851    -lgcc
  • tools/xcw/bin/helenos-pkg-config

    r5aa06ad rb501de7  
    3535SRC_ROOT="$XCW/../../.."
    3636UARCH="$("$XCW"/helenos-bld-config --uarch)"
     37if [ -z "$EXPORT_DIR" ]; then
     38        EXPORT_DIR="$SRC_ROOT/uspace/export"
     39fi
     40INCLUDE_DIR="$EXPORT_DIR/include"
     41LIB_DIR="$EXPORT_DIR/lib"
    3742
    38 libmath_cflags="-I$SRC_ROOT/uspace/lib/math/include\
    39     -I$SRC_ROOT/uspace/lib/math/arch/$UARCH/include"
    40 libmath_libs="$SRC_ROOT/uspace/lib/math/libmath.a"
     43libmath_cflags="-I$INCLUDE_DIR/libmath"
     44libmath_libs="$LIB_DIR/libmath.a"
    4145
    42 libgui_cflags="-I$SRC_ROOT/uspace/lib/gui"
    43 libgui_libs="$SRC_ROOT/uspace/lib/gui/libgui.a"
     46libgui_cflags="-I$INCLUDE_DIR/libgui"
     47libgui_libs="$LIB_DIR/libgui.a"
    4448
    45 libdraw_cflags="-I$SRC_ROOT/uspace/lib/draw"
    46 libdraw_libs="$SRC_ROOT/uspace/lib/draw/libdraw.a \
    47     $SRC_ROOT/uspace/lib/softrend/libsoftrend.a"
     49libdraw_cflags="-I$INCLUDE_DIR/libdraw"
     50libdraw_libs="$LIB_DIR/libdraw.a $LIB_DIR/libsoftrend.a"
    4851
    49 libhound_cflags="-I$SRC_ROOT/uspace/lib/hound/include"
    50 libhound_libs="$SRC_ROOT/uspace/lib/hound/libhound.a"
     52libhound_cflags="-I$INCLUDE_DIR/libhound"
     53libhound_libs="$LIB_DIR/libhound.a"
    5154
    52 libpcm_cflags="-I$SRC_ROOT/uspace/lib/pcm/include"
    53 libpcm_libs="$SRC_ROOT/uspace/lib/pcm/libpcm.a"
     55libpcm_cflags="-I$INCLUDE_DIR/libpcm"
     56libpcm_libs="$LIB_DIR/libpcm.a"
    5457
    5558action=none
  • uspace/Makefile

    r5aa06ad rb501de7  
    273273        $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
    274274
    275 export: lib/posix.build lib/math.build lib/clui.build
     275export: $(BUILDS)
    276276        $(MAKE) -r -C lib/posix export EXPORT_DIR=$(EXPORT_DIR)
    277277
  • uspace/lib/posix/Makefile

    r5aa06ad rb501de7  
    3636        ../math/libmath.a \
    3737        ../clui/libclui.a \
     38        ../gui/libgui.a \
     39        ../draw/libdraw.a \
     40        ../softrend/libsoftrend.a \
     41        ../hound/libhound.a \
     42        ../pcm/libpcm.a \
    3843        $(LIBC_PREFIX)/libc.a \
    3944        $(LIBC_PREFIX)/crt0.o \
     
    9398include $(USPACE_PREFIX)/Makefile.common
    9499
    95 export: $(EXPORT_DIR)/config.mk $(EXPORT_DIR)/config.rc
     100export: $(EXPORT_DIR)/config.mk $(EXPORT_DIR)/config.rc \
     101    $(EXPORT_DIR)/Makefile.common $(EXPORT_DIR)/Makefile.config
    96102
    97103$(EXPORT_DIR)/config.mk: export-libs export-includes
     
    111117        sed 's:$$(HELENOS_EXPORT_ROOT):$$HELENOS_EXPORT_ROOT:g' < $< >$@
    112118
     119$(EXPORT_DIR)/Makefile.common: ../../../Makefile.common
     120        cp $< $@
     121
     122$(EXPORT_DIR)/Makefile.config: ../../../Makefile.config
     123        cp $< $@
     124
    113125export-libs: $(EXPORT_FILES) export-includes
    114126        mkdir -p $(EXPORT_DIR)/lib
     
    124136        cp -L ../clui/tinput.h $(EXPORT_DIR)/include.new/libclui
    125137        rm -rf $(EXPORT_DIR)/include
     138        mkdir -p $(EXPORT_DIR)/include.new/libdraw
     139        cp -r -L -t $(EXPORT_DIR)/include.new/libdraw ../draw/*.h
     140        mkdir -p $(EXPORT_DIR)/include.new/libdraw/codec
     141        cp -r -L -t $(EXPORT_DIR)/include.new/libdraw/codec ../draw/codec/*.h
     142        mkdir -p $(EXPORT_DIR)/include.new/libgui
     143        cp -L -t $(EXPORT_DIR)/include.new/libgui ../gui/*.h
     144        mkdir -p $(EXPORT_DIR)/include.new/libhound
     145        cp -r -L -t $(EXPORT_DIR)/include.new/libhound ../hound/include/*
     146        mkdir -p $(EXPORT_DIR)/include.new/libpcm
     147        cp -r -L -t $(EXPORT_DIR)/include.new/libpcm ../pcm/include/*
    126148        mv $(EXPORT_DIR)/include.new $(EXPORT_DIR)/include
Note: See TracChangeset for help on using the changeset viewer.