chiark / gitweb /
more fixups
[elogind.git] / klibc / MCONFIG
1 # -*- makefile -*-
2 #
3 # Makefile configuration, without explicit rules
4 #
5
6 # Eventually support separate compilation, but we don't have it yet...
7 OBJROOT = $(SRCROOT)
8
9 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
10 CROSS   = 
11 CC      = $(CROSS)gcc
12 LD      = $(CROSS)ld
13 KLIBSRC = $(SRCROOT)/klibc
14 KLIBOBJ = $(OBJROOT)/klibc
15 REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include \
16           -D__KLIBC__ -DBITSIZE=$(BITSIZE) \
17           -I$(SRCROOT)/include/arch/$(ARCH) \
18           -I$(SRCROOT)/include/bits$(BITSIZE) \
19           -I$(SRCROOT)/include \
20           -I$(SRCROOT)/linux/include -I$(SRCROOT)/linux/include2
21  
22 LDFLAGS =
23 AR      = $(CROSS)ar
24 RANLIB  = $(CROSS)ranlib
25 NM      = $(CROSS)nm
26 PERL    = perl
27 STRIP   = $(CROSS)strip --strip-all -R .comment -R .note
28 OBJCOPY = $(CROSS)objcopy
29
30 HOST_CC      = gcc
31 HOST_CFLAGS  = -g -O
32 HOST_LDFLAGS = 
33 HOST_LIBS    =
34
35 # Static library paths
36 CRT0      = $(KLIBOBJ)/crt0.o
37 KLIBC     = $(KLIBOBJ)/libc.a
38 LIBGCC    = $(shell $(CC) --print-libgcc)
39
40 # Shared library paths
41 CRTSHARED = $(KLIBOBJ)/interp.o
42 LIBSHARED = $(KLIBOBJ)/libc.so
43
44 #
45 # This indicates the location of the final version of the shared library.
46 # THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
47 # Leave this empty to make it the root.
48 #
49 SHLIBDIR = /lib
50
51 # Enable this to make perror/strerror return real error messages
52 # This makes klibc.so and any static binary which uses these functions
53 # about 4K bigger.
54 ERRLIST = 1
55
56 #
57 # Include arch-specific rule fragments
58 #
59 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
60
61 # How to tell the linker main() is the entrypoint
62 EMAIN ?= -e main