From b3c063f777b6a3659f4ec9fc7fc61e9fa0e24b20 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 9 Jan 2019 19:15:15 -0500 Subject: project: added rules for installation of crt objects. --- project/extras.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'project') 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) -- cgit v1.2.3