From 3af23aadb5210aa94661c958eb8a81f421cc5c6b Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 18 Nov 2017 21:49:37 +0000 Subject: project: added w32lib.mk (generation of mdso-based import library archives). --- THANKS | 6 ++++++ project/extras.mk | 2 ++ project/tree.mk | 1 + project/w32lib/w32lib.mk | 27 +++++++++++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 THANKS create mode 100644 project/w32lib/w32lib.mk diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..a7b647b --- /dev/null +++ b/THANKS @@ -0,0 +1,6 @@ +0.0.0: + +A huge thank you to Max Marrone (max@marrone.nyc) for taking the time to +enlighten me about several make recipe tricks and quirks. Those interested +in syntax coloring (and beyond) should visit Max's github personal profile at +https://github.com/SyntaxColoring. 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 -- cgit v1.2.3