]>
Commit | Line | Data |
---|---|---|
a41a0e28 GKH |
1 | # -*- makefile -*- |
2 | # | |
3 | # Makefile configuration, without explicit rules | |
4 | # | |
5 | ||
a0622777 GKH |
6 | # Eventually support separate compilation, but we don't have it yet... |
7 | OBJROOT = $(SRCROOT) | |
8 | ||
a41a0e28 GKH |
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 | |
a0622777 GKH |
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 | ||
a41a0e28 GKH |
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 | |
a0622777 | 28 | OBJCOPY = $(CROSS)objcopy |
a41a0e28 GKH |
29 | |
30 | HOST_CC = gcc | |
da92f46b GKH |
31 | HOST_CFLAGS = -g -O |
32 | HOST_LDFLAGS = | |
a41a0e28 GKH |
33 | HOST_LIBS = |
34 | ||
73028bc3 | 35 | # Static library paths |
a0622777 GKH |
36 | CRT0 = $(KLIBOBJ)/crt0.o |
37 | KLIBC = $(KLIBOBJ)/libc.a | |
73028bc3 GKH |
38 | LIBGCC = $(shell $(CC) --print-libgcc) |
39 | ||
40 | # Shared library paths | |
a0622777 GKH |
41 | CRTSHARED = $(KLIBOBJ)/interp.o |
42 | LIBSHARED = $(KLIBOBJ)/libc.so | |
a41a0e28 GKH |
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 | ||
a0622777 GKH |
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 | ||
a41a0e28 GKH |
56 | # |
57 | # Include arch-specific rule fragments | |
58 | # | |
59 | include $(KLIBSRC)/arch/$(ARCH)/MCONFIG | |
a0622777 GKH |
60 | |
61 | # How to tell the linker main() is the entrypoint | |
62 | EMAIN ?= -e main |