chiark / gitweb /
[PATCH] scsi_id changes for use with udev %N and %p
[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 # Kernel trees (source and obj) - can potentially be different
10 KRNLSRC = $(SRCROOT)/linux
11 KRNLOBJ = $(SRCROOT)/linux
12
13 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
14 CROSS   = 
15 CC      = $(CROSS)gcc
16 LD      = $(CROSS)ld
17 KLIBSRC = $(SRCROOT)/klibc
18 KLIBOBJ = $(OBJROOT)/klibc
19 INCLUDE = -I$(SRCROOT)/include/arch/$(ARCH) \
20           -I$(SRCROOT)/include/bits$(BITSIZE) \
21           -I$(SRCROOT)/include \
22           -I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
23 REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include \
24           -D__KLIBC__ -DBITSIZE=$(BITSIZE) \
25           $(INCLUDE)
26 LDFLAGS =
27 AR      = $(CROSS)ar
28 RANLIB  = $(CROSS)ranlib
29 NM      = $(CROSS)nm
30 PERL    = perl
31 STRIP   = $(CROSS)strip --strip-all -R .comment -R .note
32 OBJCOPY = $(CROSS)objcopy
33
34 HOST_CC      = gcc
35 HOST_CFLAGS  = -g -O
36 HOST_LDFLAGS = 
37 HOST_LIBS    =
38
39 # Static library paths
40 CRT0      = $(KLIBOBJ)/crt0.o
41 KLIBC     = $(KLIBOBJ)/libc.a
42 LIBGCC    = $(shell $(CC) --print-libgcc)
43
44 # Shared library paths
45 CRTSHARED = $(KLIBOBJ)/interp.o
46 LIBSHARED = $(KLIBOBJ)/libc.so
47
48 #
49 # This indicates the location of the final version of the shared library.
50 # THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
51 # Leave this empty to make it the root.
52 #
53 SHLIBDIR = /lib
54
55 # Enable this to make perror/strerror return real error messages
56 # This makes klibc.so and any static binary which uses these functions
57 # about 4K bigger.
58 ERRLIST = 1
59
60 #
61 # Include arch-specific rule fragments
62 #
63 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
64
65 # How to tell the linker main() is the entrypoint
66 EMAIN ?= -e main