3 # Makefile configuration, without explicit rules
6 # Eventually support separate compilation, but we don't have it yet...
9 # Kernel trees (source and obj) - can potentially be different
10 KRNLSRC = $(SRCROOT)/linux
11 KRNLOBJ = $(SRCROOT)/linux
13 ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
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) \
28 RANLIB = $(CROSS)ranlib
31 STRIP = $(CROSS)strip --strip-all -R .comment -R .note
32 OBJCOPY = $(CROSS)objcopy
39 # Static library paths
40 CRT0 = $(KLIBOBJ)/crt0.o
41 KLIBC = $(KLIBOBJ)/libc.a
42 LIBGCC = $(shell $(CC) --print-libgcc)
44 # Shared library paths
45 CRTSHARED = $(KLIBOBJ)/interp.o
46 LIBSHARED = $(KLIBOBJ)/libc.so
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.
55 # Enable this to make perror/strerror return real error messages
56 # This makes klibc.so and any static binary which uses these functions
61 # Include arch-specific rule fragments
63 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
65 # How to tell the linker main() is the entrypoint