3 # Makefile configuration, without explicit rules
6 # Eventually support separate compilation, but we don't have it yet...
9 ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
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
24 RANLIB = $(CROSS)ranlib
27 STRIP = $(CROSS)strip --strip-all -R .comment -R .note
28 OBJCOPY = $(CROSS)objcopy
35 # Static library paths
36 CRT0 = $(KLIBOBJ)/crt0.o
37 KLIBC = $(KLIBOBJ)/libc.a
38 LIBGCC = $(shell $(CC) --print-libgcc)
40 # Shared library paths
41 CRTSHARED = $(KLIBOBJ)/interp.o
42 LIBSHARED = $(KLIBOBJ)/libc.so
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.
51 # Enable this to make perror/strerror return real error messages
52 # This makes klibc.so and any static binary which uses these functions
57 # Include arch-specific rule fragments
59 include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
61 # How to tell the linker main() is the entrypoint