2 L4DIR ?= $(PKGDIR)/../../..
4 # CRT0 lib for statically linked binaries
5 SRC_C_libcrt0.a := construction.c support.c
6 SRC_S_libcrt0.a := crt0_x.S
8 # CRT0 lib for dynamically linked binaries
9 SRC_C_libcrt0_s.a := construction.c
10 SRC_S_libcrt0_s.a := crt0_x.S
12 # Stand alone lib for initializing the EH frames in statically
13 # linked binaries (usually this in n_crt0.S
14 SRC_CC_libcrt0_eh.o.a := init_eh_frame.cc
16 TARGET = libcrt0.a libcrt0_s.a libcrt0_eh.o.a
18 SYSTEMS = $(SYSTEMS_PLAIN)
20 # find the arch dependent things
21 vpath %.S $(PKGDIR)/lib/src/ARCH-$(ARCH)
23 INSTALL_TARGET = $(TARGET) $(MYOBJS)
24 KEEP_ON_CLEAN = $(MYOBJS)
26 include $(L4DIR)/mk/lib.mk
28 crt0.o: crt0_x.o init_eh_frame.o
30 $(VERBOSE)$(LD) $(filter-out -gc-sections,$(LDFLAGS)) -r $(filter %.o,$^) -o $@
32 crt0.s.o: support.s.o .general.d
34 $(VERBOSE)$(LD) $(LDFLAGS) -r $(filter %.o,$^) -o $@