summaryrefslogtreecommitdiffhomepage
path: root/sofort/core/_infer/infer_modern.mk
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-10 10:40:45 +0000
committermidipix <writeonce@midipix.org>2021-04-10 20:54:41 +0000
commit2a07d4c072de2010542318966a0e5c06fe4aef1e (patch)
treef3f4364e94eb5fa6a4f3900e2daf36b084c99c57 /sofort/core/_infer/infer_modern.mk
parent0a532ed81924c28d534f045ffd47618eb7fd7177 (diff)
downloadmdso-2a07d4c072de2010542318966a0e5c06fe4aef1e.tar.bz2
mdso-2a07d4c072de2010542318966a0e5c06fe4aef1e.tar.xz
build system: posix make support: refactored project-agnostic inference rules.
Diffstat (limited to 'sofort/core/_infer/infer_modern.mk')
-rw-r--r--sofort/core/_infer/infer_modern.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/sofort/core/_infer/infer_modern.mk b/sofort/core/_infer/infer_modern.mk
new file mode 100644
index 0000000..e7db2a6
--- /dev/null
+++ b/sofort/core/_infer/infer_modern.mk
@@ -0,0 +1,19 @@
+# infer_modern.mk: modern make target- and inference rules.
+# this file is covered by COPYING.SOFORT.
+
+src/%.ao: $(SOURCE_DIR)/src/%.c
+ $(CC) -c -o $@ $< $(CFLAGS_APP)
+
+src/%.lo: $(SOURCE_DIR)/src/%.c
+ $(CC) -c -o $@ $< $(CFLAGS_SHARED)
+
+src/%.o: $(SOURCE_DIR)/src/%.c
+ $(CC) -c -o $@ $< $(CFLAGS_STATIC)
+
+$(SHARED_LIB):
+ $(SHARED_LIB_CMD) $@ $^ $(SHARED_LIB_LDFLAGS) $(LDFLAGS_IMPLIB)
+
+lib/%$(OS_ARCHIVE_EXT):
+ mkdir -p lib
+ rm -f $@
+ $(AR) rcs $@ $^