summaryrefslogtreecommitdiff
path: root/debian/gcc-uClibc/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-13 10:19:01 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-13 10:19:01 +0000
commit0ab048b6557ea0a337b96f5d0558694a237dfab8 (patch)
tree89dbb0a558beba1894d348fc537cc8d5e8a3d74a /debian/gcc-uClibc/Makefile
parent9cb6901edf2145a9111f11b15acf9d74494bd04d (diff)
Update the debian packaging for use in a standalone uClibc
system, rather than being a subordinate lib under a glibc based system. -Erik
Diffstat (limited to 'debian/gcc-uClibc/Makefile')
-rw-r--r--debian/gcc-uClibc/Makefile99
1 files changed, 0 insertions, 99 deletions
diff --git a/debian/gcc-uClibc/Makefile b/debian/gcc-uClibc/Makefile
deleted file mode 100644
index b4b4808d0..000000000
--- a/debian/gcc-uClibc/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-# Makefile for building a fake gcc/binutils toolchain
-# that simply spoofs the location of the C library
-#
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
-#
-
-TOPDIR = ../../
-include $(TOPDIR)Rules.mak
-
-UCLIBC_DIR := $(shell (cd $(TOPDIR); /bin/pwd))
-GCC_BIN := $(shell which $(CC))
-LD_BIN := $(shell which $(LD))
-GCCINCDIR := $(shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
-
-ifeq ($(HAVE_SHARED),y)
- LIBRARY_CACHE:=#-DUSE_CACHE
- ifeq ($(BUILD_UCLIBC_LDSO),y)
- LDSO:=$(TOPDIR)lib/$(UCLIBC_LDSO)
- DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)
- else
- LDSO:=$(SYSTEM_LDSO)
- DYNAMIC_LINKER:=/lib/$(strip $(subst ",, $(notdir $(SYSTEM_LDSO))))
- endif
-endif
-
-all: $(TARGET_ARCH)-uclibc-gcc $(TARGET_ARCH)-uclibc-ld
-
-gcc-uClibc.h: Makefile $(TOPDIR)/.config
- @echo "/* this file was autogenerated by make */" > $@
- @echo "#define UCLIBC_TARGET_PREFIX " \"$(TARGET_PREFIX)\" >> $@
- @echo "#define UCLIBC_DEVEL_PREFIX " \"$(DEVEL_PREFIX)\" >> $@
- @echo "#define UCLIBC_BUILD_DIR " \"$(UCLIBC_DIR)\" >> $@
- @echo "#define GCC_BIN " \"$(GCC_BIN)\" >> $@
- @echo "#define LIBGCC_DIR " \"$(LIBGCC_DIR)\" >> $@
- @echo "#define TARGET_ARCH " \"$(TARGET_ARCH)\" >> $@
- @echo "#define DYNAMIC_LINKER " \"$(DYNAMIC_LINKER)\" >> $@
- @echo "#define BUILD_DYNAMIC_LINKER " \"$(UCLIBC_DIR)/lib/$(UCLIBC_LDSO)\" >> $@
-ifeq ($(strip $(HAVE_SHARED)),y)
- @echo "#define __UCLIBC_HAS_SHARED__ 1" >> $@
-else
- @echo "#undef __UCLIBC_HAS_SHARED__" >> $@
-endif
-ifeq ($(strip $(UCLIBC_HAS_MMU)),y)
- @echo "#define __UCLIBC_HAS_MMU__ 1" >> $@
-else
- @echo "#undef __UCLIBC_HAS_MMU__" >> $@
-endif
-ifeq ($(strip $(HAS_ELF)),y)
- @echo "#define __HAS_ELF__ 1" >> $@
-else
- @echo "#undef __HAS_ELF__" >> $@
-endif
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
- @echo "#define __UCLIBC_CTOR_DTOR__ 1" >> $@
-ifeq ($(strip $(UCLIBC_PROFILING)),y)
- @echo "#define __UCLIBC_PROFILING__ 1" >> $@
-else
- @echo "#undef __UCLIBC_PROFILING__" >> $@
-endif
-else
- @echo "#undef __UCLIBC_CTOR_DTOR__" >> $@
-endif
-
-$(TARGET_ARCH)-uclibc-gcc: gcc-uClibc.c gcc-uClibc.h
- $(HOSTCC) $(HOSTCFLAGS) -s $< -o $@
-
-$(TARGET_ARCH)-uclibc-ld: Makefile $(TOPDIR)/.config
- @echo "#!/bin/sh" > $@
- @echo "# This file was autogenerated by make" >> $@
- @echo "exec $(LD_BIN) \"\$$@\" -L$(DEVEL_PREFIX)usr/lib " \
- "-L$(DEVEL_PREFIX)lib -L$(UCLIBC_DIR)" >> $@
- chmod a+x $@
-
-install: all
- $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)usr/bin
- $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)bin
- $(INSTALL) -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/
- $(INSTALL) -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_PREFIX)bin/
- $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-cc
- $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/gcc
- $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/cc
- $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_PREFIX)usr/bin/ld
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
- $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-g++
- $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-c++
- $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/c++
- $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/g++
-endif
- for app in addr2line ar as cpp gasp nm objcopy \
- objdump ranlib size strings strip; do \
- APPNAME=`which $(CROSS)$${app} 2>/dev/null`; \
- if [ -x "$$APPNAME" ] ; then \
- $(LN) -fs "$$APPNAME" $(PREFIX)$(DEVEL_PREFIX)usr/bin/$${app}; \
- $(LN) -fs "$$APPNAME" $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-$${app}; \
- fi; \
- done
-
-clean:
- $(RM) gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core