blob: 0fa0ecac34707a8cff3698f16ecbec7be2e0040e [file] [log] [blame]
# -*- makefile -*-
#
# Makefile configuration, without explicit rules
#
ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
CROSS =
CC = $(CROSS)gcc
LD = $(CROSS)ld
REQFLAGS = -nostdinc -iwithprefix include -I. \
-I./arch/$(ARCH)/include -I./include/bits$(BITSIZE) \
-DBITSIZE=$(BITSIZE) -I./include -I./linux/include \
-W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
CFLAGS = $(OPTFLAGS) $(REQFLAGS)
LDFLAGS =
AR = $(CROSS)ar
RANLIB = $(CROSS)ranlib
PERL = perl
STRIP = $(CROSS)strip -R .comment -R .note
SOFLAGS = -fPIC
SOOBJS = $(patsubst %.o,%.lo,$(LIBOBJS))
SOLIB = libc.so
SONAME = libc.so
CRT0 = crt0.o
LIBGCC = $(shell $(CC) --print-libgcc)
#
# Include arch-specific rule fragments
#
include arch/$(ARCH)/MCONFIG
.SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
.c.i:
$(CC) $(CFLAGS) -E -o $@ $<
.c.s:
$(CC) $(CFLAGS) -S -o $@ $<
.S.o:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
.S.s:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
.S.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
.S.ls:
$(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
.s.o:
$(CC) $(CFLAGS) -x assembler -c -o $@ $<
.ls.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
.c.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
.c.ls:
$(CC) $(CFLAGS) $(SOFLAGS) -S -o $@ $<