chiark / gitweb /
[PATCH] klibc: update v0.205
[elogind.git] / klibc / MCONFIG
1 # -*- makefile -*-
2 #
3 # Makefile configuration, without explicit rules
4 #
5
6 # Location for installation
7 prefix      = /usr
8 bindir      = $(prefix)/bin
9 libdir      = $(prefix)/lib
10 mandir      = $(prefix)/man
11 INSTALLDIR  = $(prefix)/lib/klibc
12 INSTALLROOT =
13
14 INSTALL_EXEC = install -m 755
15 INSTALL_DATA = install -m 644
16
17 # Eventually support separate compilation, but we don't have it yet...
18 OBJROOT = $(SRCROOT)
19
20 # Kernel trees (source and obj) - can potentially be different
21 KRNLSRC = $(SRCROOT)/linux
22 KRNLOBJ = $(SRCROOT)/linux
23
24 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
25 CROSS   = 
26 CC      = $(CROSS)gcc
27 LD      = $(CROSS)ld
28 KLIBSRC = $(SRCROOT)/klibc
29 KLIBOBJ = $(OBJROOT)/klibc
30 INCLUDE = -I$(SRCROOT)/include/arch/$(ARCH) \
31           -I$(SRCROOT)/include/bits$(BITSIZE) \
32           -I$(SRCROOT)/include \
33           -I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
34 REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include -D__KLIBC__ \
35            $(INCLUDE)
36 LDFLAGS =
37 AR      = $(CROSS)ar
38 RANLIB  = $(CROSS)ranlib
39 NM      = $(CROSS)nm
40 PERL    = perl
41 OBJCOPY = $(CROSS)objcopy
42
43 STRIP      = $(CROSS)strip
44 STRIPFLAGS = --strip-all -R .comment -R .note
45 STRIPCMD   = $(STRIP) $(STRIPFLAGS)
46
47 HOST_CC      = gcc
48 HOST_CFLAGS  = -g -O
49 HOST_LDFLAGS = 
50 HOST_LIBS    =
51
52 # Static library paths
53 CRT0      = $(KLIBOBJ)/crt0.o
54 KLIBC     = $(KLIBOBJ)/libc.a
55 LIBGCC    = $(shell $(CC) --print-libgcc)
56
57 # Shared library paths
58 CRTSHARED = $(KLIBOBJ)/interp.o
59 LIBSHARED = $(KLIBOBJ)/libc.so
60
61 #
62 # This indicates the location of the final version of the shared library.
63 # THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
64 # Leave this empty to make it the root.
65 #
66 SHLIBDIR = /lib
67
68 # Enable this to make perror/strerror return real error messages
69 # This makes klibc.so and any static binary which uses these functions
70 # about 4K bigger.
71 ERRLIST = 1
72
73 # Include zlib in klibc.  This roughly triples the size of klibc!
74 ZLIB = 0
75
76 #
77 # Include arch-specific rule fragments
78 #
79 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
80
81 ifeq ($(DEBUG),y)
82 STRIP     = /bin/true -Since_we_are_debugging
83 OPTFLAGS += -O1 -g
84 endif
85
86 # How to tell the linker main() is the entrypoint
87 EMAIN ?= -e main