summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--THANKS6
-rw-r--r--project/extras.mk2
-rw-r--r--project/tree.mk1
-rw-r--r--project/w32lib/w32lib.mk27
4 files changed, 36 insertions, 0 deletions
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