1 2INSTALL_TARGET += libgcc.a $(if $(LIBGCC_DO_SHARED),libgcc.so) 3 4include $(L4DIR)/mk/lib.mk 5 6define process_libgcc_generic 7 $(CP) -f $(1) $(2) 8endef 9 10define process_libgcc_arm 11 remove="$(filter linux-atomic.o linux-atomic-64bit.o, \ 12 $(shell $(AR) t $(1)))"; \ 13 $(CP) -f $(1) $(2); \ 14 $(AR) d $(2) $$remove; \ 15 $(if $(L4API),$(AR) rs $(2) $(if $(3),ARCH-arm/l4-atomic.s.o ARCH-arm/l4-atomic-64bit.s.o,ARCH-arm/l4-atomic.o ARCH-arm/l4-atomic-64bit.o);) 16endef 17 18process_libgcc = $(if $(process_libgcc_$(ARCH)), \ 19 $(process_libgcc_$(ARCH)), \ 20 $(process_libgcc_generic)) 21 22ifneq ($(SYSTEM),) 23all:: libgcc.a $(if $(LIBGCC_DO_SHARED),libgcc.so) 24endif 25 26libgcc.a libgcc.so: $(GENERAL_D_LOC) $(LIBGCC_LIB_DIR)/Makefile.libgcc $(foreach f,$(TARGET),$(OBJS_$(f))) $(GCCLIB_HOST) 27 @$(GEN_MESSAGE) 28 $(VERBOSE)$(call process_libgcc,$(GCCLIB_HOST),$@,$(filter libgcc.so,$@)) 29 30clean cleanall:: 31 $(VERBOSE)$(RM) libgcc.a libgcc.so 32 33GCCLIB_SO = 34