summaryrefslogtreecommitdiffhomepage
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-11-18 21:49:37 +0000
committermidipix <writeonce@midipix.org>2017-11-18 18:39:47 -0500
commit3af23aadb5210aa94661c958eb8a81f421cc5c6b (patch)
tree088e440e89fa12ab54760cb6dde102a28a7be3a1 /project
parentbc99f6d8189bd5f20d8f31697fc92e896b099e56 (diff)
downloadw32lib-3af23aadb5210aa94661c958eb8a81f421cc5c6b.tar.bz2
w32lib-3af23aadb5210aa94661c958eb8a81f421cc5c6b.tar.xz
project: added w32lib.mk (generation of mdso-based import library archives).
Diffstat (limited to 'project')
-rw-r--r--project/extras.mk2
-rw-r--r--project/tree.mk1
-rw-r--r--project/w32lib/w32lib.mk27
3 files changed, 30 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk
index fa9ef79..a25054a 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -4,3 +4,5 @@ CFLAGS_APP_ATTR += -DWLIB_APP
src/driver/wlib_driver_ctx.o: version.tag
src/driver/wlib_driver_ctx.lo: version.tag
+
+include $(PROJECT_DIR)/project/w32lib/w32lib.mk
diff --git a/project/tree.mk b/project/tree.mk
index 52f79f7..2045989 100644
--- a/project/tree.mk
+++ b/project/tree.mk
@@ -1,2 +1,3 @@
tree.tag:
+ mkdir -p lib
touch tree.tag
diff --git a/project/w32lib/w32lib.mk b/project/w32lib/w32lib.mk
new file mode 100644
index 0000000..e7fb4c9
--- /dev/null
+++ b/project/w32lib/w32lib.mk
@@ -0,0 +1,27 @@
+W32LIB += $(W32DLL:%.dll=lib/lib%.a)
+W32LIB += $(W32DRV:%.drv=lib/lib%.a)
+
+lib/lib%.a: $(SOURCE_DIR)/def/%.def $(SOURCE_DIR)/fake/%.dll host.tag tree.tag
+ $(MDSO) -n $*.dll -i $@ $(SOURCE_DIR)/def/$*.def
+
+lib/lib%.a: $(SOURCE_DIR)/def/%.def $(SOURCE_DIR)/fake/%.drv host.tag tree.tag
+ $(MDSO) -n $*.drv -i $@ $(SOURCE_DIR)/def/$*.def
+
+w32lib: $(W32LIB)
+
+all: w32lib
+
+install-w32lib: w32lib
+ mkdir -p $(DESTDIR)$(LIBDIR)/$(PACKAGE)
+ cp $(W32LIB) $(DESTDIR)$(LIBDIR)/$(PACKAGE)
+
+install: install-w32lib
+
+clean-w32lib:
+ rm -rf $(W32LIB)
+
+clean: clean-w32lib
+
+.PHONY: w32lib
+.PHONY: install-w32lib
+.PHONY: clean-w32lib