chiark / gitweb /
[PATCH] klibc: update v0.205
[elogind.git] / klibc / MCONFIG
index d2aa23626c17ff535d991c6db9638345ea022b90..a7b2cb1bf36865eed26215e1674086c457c7fec8 100644 (file)
@@ -3,30 +3,47 @@
 # Makefile configuration, without explicit rules
 #
 
+# Location for installation
+prefix      = /usr
+bindir      = $(prefix)/bin
+libdir      = $(prefix)/lib
+mandir      = $(prefix)/man
+INSTALLDIR  = $(prefix)/lib/klibc
+INSTALLROOT =
+
+INSTALL_EXEC = install -m 755
+INSTALL_DATA = install -m 644
+
 # Eventually support separate compilation, but we don't have it yet...
 OBJROOT = $(SRCROOT)
 
+# Kernel trees (source and obj) - can potentially be different
+KRNLSRC = $(SRCROOT)/linux
+KRNLOBJ = $(SRCROOT)/linux
+
 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 CROSS   = 
 CC     = $(CROSS)gcc
 LD      = $(CROSS)ld
 KLIBSRC = $(SRCROOT)/klibc
 KLIBOBJ = $(OBJROOT)/klibc
-REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include \
-         -D__KLIBC__ -DBITSIZE=$(BITSIZE) \
-         -I$(SRCROOT)/include/arch/$(ARCH) \
+INCLUDE = -I$(SRCROOT)/include/arch/$(ARCH) \
          -I$(SRCROOT)/include/bits$(BITSIZE) \
          -I$(SRCROOT)/include \
-         -I$(SRCROOT)/linux/include -I$(SRCROOT)/linux/include2
+         -I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
+REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include -D__KLIBC__ \
+          $(INCLUDE)
 LDFLAGS =
 AR      = $(CROSS)ar
 RANLIB  = $(CROSS)ranlib
 NM     = $(CROSS)nm
 PERL    = perl
-STRIP   = $(CROSS)strip --strip-all -R .comment -R .note
 OBJCOPY = $(CROSS)objcopy
 
+STRIP      = $(CROSS)strip
+STRIPFLAGS = --strip-all -R .comment -R .note
+STRIPCMD   = $(STRIP) $(STRIPFLAGS)
+
 HOST_CC      = gcc
 HOST_CFLAGS  = -g -O
 HOST_LDFLAGS = 
@@ -53,10 +70,18 @@ SHLIBDIR = /lib
 # about 4K bigger.
 ERRLIST = 1
 
+# Include zlib in klibc.  This roughly triples the size of klibc!
+ZLIB = 0
+
 #
 # Include arch-specific rule fragments
 #
 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
 
+ifeq ($(DEBUG),y)
+STRIP     = /bin/true -Since_we_are_debugging
+OPTFLAGS += -O1 -g
+endif
+
 # How to tell the linker main() is the entrypoint
 EMAIN ?= -e main