1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
#
# Makefile for crt0.o of Linux
#
#
LD=true
MV=true
override STATIC_SHARED=false
override SHARED=false
override DEBUG=false
TOPDIR=../../../..
include $(TOPDIR)/Makeconfig
include $(TOPDIR)/Makerules
RFLAGS= -DDEFAULT_LOCALE="`$(CC) -E defaultlocale.c | grep DEFAULT_LOCALE | cut -f2 -d':'`"
PIC_CFLAGS=$(CFLAGS)
SHARED_CFLAGS=$(CFLAGS)
DEBUG_CFLAGS=$(CFLAGS)
PROFILE_CFLAGS=$(CFLAGS)
CHECKER_CFLAGS=$(CFLAGS)
CC = $(REALCC)
SRCS= defaultlocale.c
ifeq ($(ELF),true)
lib:: $(ELF_SHARED_DIR)/crt1.o \
$(ELF_SHARED_DIR)/crti.o $(ELF_SHARED_DIR)/crtn.o \
$(ELF_PROFILE_DIR)/gcrt1.o
$(ELF_SHARED_DIR)/crt1.o: crt1.s crt0.s
as crt1.s -o $(ELF_SHARED_DIR)/crt1.o
as crt0.s -o $(ELF_SHARED_DIR)/crt0.o
$(ELF_PROFILE_DIR)/gcrt1.o: gcrt1.s gcrt0.s
as gcrt1.s -o $(ELF_PROFILE_DIR)/gcrt1.o
as gcrt0.s -o $(ELF_PROFILE_DIR)/gcrt0.o
else
ifeq ($(CHECKER),true)
lib:: $(CHECKER_DIR)/chkrcrt0.o
endif
ifeq ($(PROFILE),true)
lib:: $(PROFILE_DIR)/gcrt0.o
endif
ifeq ($(STATIC),true)
lib:: $(STATIC_DIR)/crt0.o
endif
endif
lib::
@true
realclean clean:
$(RM) -f core *.s *.o *.a tmp_make foo
depend:
$(CC) -M $(SRCS) | \
sed -e 's,^[ ]*\(.*\.o\)[ ]*:,$(STATIC_DIR)/crt0.o $(PROFILE_DIR)/gcrt0.o $(ELF_SHARED_DIR)/crt1.o $(ELF_PROFILE_DIR)/gcrt1.o $(CHECKER_DIR)/checkcrt0.o:,' > .depend
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
|