summaryrefslogtreecommitdiffhomepage
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-09 19:15:15 -0500
committermidipix <writeonce@midipix.org>2019-01-09 22:43:18 -0500
commitb3c063f777b6a3659f4ec9fc7fc61e9fa0e24b20 (patch)
treee64a8466d644d11390b6bfd4d324329ae5051143 /project
parent3ca8cd866333a3b37d05738ea5ccd95a1f1c20a1 (diff)
downloadmmglue-b3c063f777b6a3659f4ec9fc7fc61e9fa0e24b20.tar.bz2
mmglue-b3c063f777b6a3659f4ec9fc7fc61e9fa0e24b20.tar.xz
project: added rules for installation of crt objects.
Diffstat (limited to 'project')
-rw-r--r--project/extras.mk17
1 files changed, 17 insertions, 0 deletions
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)