From b3c063f777b6a3659f4ec9fc7fc61e9fa0e24b20 Mon Sep 17 00:00:00 2001 From: midipix Date: Jan 10 2019 03:43:18 +0000 Subject: project: added rules for installation of crt objects. --- diff --git a/project/extras.mk b/project/extras.mk index 370be4c..fd9d239 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -65,3 +65,20 @@ $(DESTDIR)$(LIBDIR)/%.a: lib/%.a $(DESTDIR)$(LIBDIR) install-shared: $(LIBC_EMPTY_LIBS_TARGET) install-static: $(LIBC_EMPTY_LIBS_TARGET) + +# crt objects +CRT_OBJS_REFS = $(subst $(ARCH)/,,$(CRT_OBJS)) +CRT_OBJS_TARGET = $(subst ./crt/,$(DESTDIR)$(LIBDIR)/,$(CRT_OBJS_REFS)) + +$(DESTDIR)$(LIBDIR)/%.o: crt/$(ARCH)/%.o $(DESTDIR)$(LIBDIR) + cp $< $@.tmp + chmod 0644 $@.tmp + mv $@.tmp $@ + +$(DESTDIR)$(LIBDIR)/%.o: crt/%.o $(DESTDIR)$(LIBDIR) + cp $< $@.tmp + chmod 0644 $@.tmp + mv $@.tmp $@ + +install-shared: $(CRT_OBJS_TARGET) +install-static: $(CRT_OBJS_TARGET)