summaryrefslogtreecommitdiff
path: root/extra/gcc-uClibc/Makefile
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-05-31 21:23:20 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-05-31 21:23:20 +0000
commitdd4d42c2b998b2b95912ac04106fb7a9b1b0a57e (patch)
tree19bdbd5e7c1fc93edcd14b115fdbdf3be205389d /extra/gcc-uClibc/Makefile
parentf43cd38254b0f915fcade2f61218430ebb5e3db3 (diff)
Removed INSTALL_DIR and replaced it with DEVEL_PREFIX, ROOT_DIR, and
TARGET_PREFIX to allow more flexibility. Also modified the gcc wrapper to do the right thing if -Wl,--dynamic-linker,xxx is passed on the command line. The gcc wrapper will also check the env variable UCLIBC_GCC_LDOPT for a dynamic linker option at runtime (although command line arg overrides the env variable).
Diffstat (limited to 'extra/gcc-uClibc/Makefile')
-rw-r--r--extra/gcc-uClibc/Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index 71e31620c..3cfdad478 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -11,7 +11,8 @@ all: gcc-uClibc ld-uClibc
gcc-uClibc.h: clean
@echo "/* this file was autogenerated by make */" > gcc-uClibc.h
- @echo "#define UCLIBC_INSTALL_DIR " \"$(INSTALL_DIR)/\" >> gcc-uClibc.h
+ @echo "#define UCLIBC_ROOT_DIR " \"$(ROOT_DIR)\" >> gcc-uClibc.h
+ @echo "#define UCLIBC_DEVEL_PREFIX " \"$(DEVEL_PREFIX)\" >> gcc-uClibc.h
@echo "#define UCLIBC_BUILD_DIR " \"$(UCLIBC_DIR)/\" >> gcc-uClibc.h
@echo "#define GCC_BIN " \"$(GCC_BIN)\" >> gcc-uClibc.h
@echo "#define GCC_LIB " \"$(GCC_LIB)\" >> gcc-uClibc.h
@@ -25,28 +26,28 @@ gcc-uClibc: gcc-uClibc.h gcc-uClibc.c
ld-uClibc:
@echo "#!/bin/sh" > $(TARGET_ARCH)-uclibc-ld
@echo "# This file was autogenerated by make" >> $(TARGET_ARCH)-uclibc-ld
- @echo "$(LD_BIN) -L- -L$(INSTALL_DIR)/lib -L$(INSTALL_DIR)/usr/lib "\
+ @echo "$(LD_BIN) -L- -L$(DEVEL_PREFIX)$(ROOT_DIR)/lib -L$(DEVEL_PREFIX)$(ROOT_DIR)/usr/lib "\
"-L$(UCLIBC_DIR) \$$@" >> $(TARGET_ARCH)-uclibc-ld
chmod a+x $(TARGET_ARCH)-uclibc-ld
install: all
- install -d $(INSTALL_DIR)/bin;
- install -d $(INSTALL_DIR)/usr/bin;
+ install -d $(DEVEL_PREFIX)$(ROOT_DIR)/bin;
+ install -d $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin;
if [ -x ./$(TARGET_ARCH)-uclibc-gcc ] ; then \
- install -m 755 $(TARGET_ARCH)-uclibc-gcc $(INSTALL_DIR)/usr/bin/ ; \
- install -m 755 $(TARGET_ARCH)-uclibc-ld $(INSTALL_DIR)/usr/bin/ ; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(INSTALL_DIR)/bin/cc; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(INSTALL_DIR)/bin/gcc; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-ld $(INSTALL_DIR)/bin/ld; \
- ln -fs $(TARGET_ARCH)-uclibc-gcc $(INSTALL_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-cc; \
+ install -m 755 $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \
+ install -m 755 $(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \
+ ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/cc; \
+ ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/gcc; \
+ ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/bin/ld; \
+ ln -fs $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-cc; \
fi;
for app in addr2line ar as cpp gasp nm objcopy \
objdump ranlib readelf size strings strip; do \
- ln -fs `which $(CROSS)$${app}` $(INSTALL_DIR)/bin/$${app}; \
+ ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)$(ROOT_DIR)/bin/$${app}; \
done;
for app in addr2line ar as cpp gasp nm objcopy \
objdump ranlib readelf size strings strip; do \
- ln -fs `which $(CROSS)$${app}` $(INSTALL_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \
+ ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \
done;