Systemd/klibc/MCONFIG

99 lines
2.6 KiB
Plaintext
Raw Normal View History

# -*- makefile -*-
#
# Makefile configuration, without explicit rules
#
2005-03-05 07:36:51 +01:00
# CROSS is the prefix used for system tools like gcc, ld etc.
CROSS =
# KCROSS is the prefix we use for klibc installations. This is usually
# the same as CROSS, but may be different, e.g. to install an i386
# cross-compilation suite on an x86-64 system, using the same gcc/binutils.
KCROSS ?= $(CROSS)
2005-03-04 04:26:44 +01:00
# Location for installation
prefix = /usr
bindir = $(prefix)/bin
libdir = $(prefix)/lib
mandir = $(prefix)/man
INSTALLDIR = $(prefix)/lib/klibc
INSTALLROOT =
INSTALL_EXEC = install -m 755
INSTALL_DATA = install -m 644
2004-10-06 03:32:12 +02:00
# Eventually support separate compilation, but we don't have it yet...
OBJROOT = $(SRCROOT)
2004-12-14 11:42:06 +01:00
# Kernel trees (source and obj) - can potentially be different
KRNLSRC = $(SRCROOT)/linux
KRNLOBJ = $(SRCROOT)/linux
2005-03-10 17:51:43 +01:00
# klibc version information
KLIBCVER = -D__KLIBC__=$(shell cut -d. -f1 < $(SRCROOT)/version) \
-D__KLIBC_MINOR__=$(shell cut -d. -f2 < $(SRCROOT)/version)
ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/parisc.*/parisc/)
CC = $(CROSS)gcc
LD = $(CROSS)ld
KLIBSRC = $(SRCROOT)/klibc
2004-10-06 03:32:12 +02:00
KLIBOBJ = $(OBJROOT)/klibc
2004-12-14 11:42:06 +01:00
INCLUDE = -I$(SRCROOT)/include/arch/$(ARCH) \
2004-10-06 03:32:12 +02:00
-I$(SRCROOT)/include/bits$(BITSIZE) \
-I$(SRCROOT)/include \
2004-12-14 11:42:06 +01:00
-I$(KRNLOBJ)/include -I$(KRNLOBJ)/include2 -I$(KRNLSRC)/include
REQFLAGS = $(ARCHREQFLAGS) $(KLIBCVER) -nostdlib -nostdinc -iwithprefix include \
2005-03-04 04:26:44 +01:00
$(INCLUDE)
LDFLAGS =
AR = $(CROSS)ar
RANLIB = $(CROSS)ranlib
NM = $(CROSS)nm
PERL = perl
2004-10-06 03:32:12 +02:00
OBJCOPY = $(CROSS)objcopy
2005-03-04 04:26:44 +01:00
STRIP = $(CROSS)strip
STRIPFLAGS = --strip-all -R .comment -R .note
STRIPCMD = $(STRIP) $(STRIPFLAGS)
HOST_CC = gcc
2004-02-12 03:34:28 +01:00
HOST_CFLAGS = -g -O
HOST_LDFLAGS =
HOST_LIBS =
# Static library paths
2004-10-06 03:32:12 +02:00
CRT0 = $(KLIBOBJ)/crt0.o
KLIBC = $(KLIBOBJ)/libc.a
2005-03-07 07:04:46 +01:00
LIBGCC = $(shell $(CC) $(REQFLAGS) $(OPTFLAGS) --print-libgcc)
# Shared library paths
2004-10-06 03:32:12 +02:00
CRTSHARED = $(KLIBOBJ)/interp.o
LIBSHARED = $(KLIBOBJ)/libc.so
#
# This indicates the location of the final version of the shared library.
# THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
# Leave this empty to make it the root.
#
SHLIBDIR = /lib
2004-10-06 03:32:12 +02:00
# Enable this to make perror/strerror return real error messages
# This makes klibc.so and any static binary which uses these functions
# about 4K bigger.
ERRLIST = 1
2005-03-04 04:26:44 +01:00
# Include zlib in klibc. This roughly triples the size of klibc!
ZLIB = 0
#
# Include arch-specific rule fragments
#
include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
2004-10-06 03:32:12 +02:00
2005-02-24 19:54:47 +01:00
ifeq ($(DEBUG),y)
STRIP = /bin/true -Since_we_are_debugging
OPTFLAGS += -O1 -g
endif
2004-10-06 03:32:12 +02:00
# How to tell the linker main() is the entrypoint
EMAIN ?= -e main