summaryrefslogtreecommitdiffhomepage
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-09 18:41:39 -0500
committermidipix <writeonce@midipix.org>2019-01-09 22:43:18 -0500
commit3ca8cd866333a3b37d05738ea5ccd95a1f1c20a1 (patch)
treea04af156d619ead67cc3a26fac3e468d20ebcc46 /project
parent0563c2a391adf5a2243de4c7d17c9b976cffff60 (diff)
downloadmmglue-3ca8cd866333a3b37d05738ea5ccd95a1f1c20a1.tar.bz2
mmglue-3ca8cd866333a3b37d05738ea5ccd95a1f1c20a1.tar.xz
project: added rules for creation and installation of empty libs.
Diffstat (limited to 'project')
-rw-r--r--project/extras.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk
index 42ebf96..370be4c 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -45,3 +45,23 @@ libc_mem_lobjs = $(libc_mem_modules:%.c=%.lo)
$(libc_mem_objs): CFLAGS_CONFIG += -fno-tree-loop-distribute-patterns
$(libc_mem_lobjs): CFLAGS_CONFIG += -fno-tree-loop-distribute-patterns
+
+# target libdir
+$(DESTDIR)$(LIBDIR):
+ mkdir -p $@
+
+# empty libs
+LIBC_EMPTY_LIBS_NAMES = m rt dl crypt util pthread xnet resolv
+LIBC_EMPTY_LIBS = $(LIBC_EMPTY_LIBS_NAMES:%=lib/lib%.a)
+LIBC_EMPTY_LIBS_TARGET = $(LIBC_EMPTY_LIBS_NAMES:%=$(DESTDIR)$(LIBDIR)/lib%.a)
+
+shared-lib: $(LIBC_EMPTY_LIBS)
+static-lib: $(LIBC_EMPTY_LIBS)
+
+$(DESTDIR)$(LIBDIR)/%.a: lib/%.a $(DESTDIR)$(LIBDIR)
+ cp $< $@.tmp
+ chmod 0644 $@.tmp
+ mv $@.tmp $@
+
+install-shared: $(LIBC_EMPTY_LIBS_TARGET)
+install-static: $(LIBC_EMPTY_LIBS_TARGET)