]> Nishi Git Mirror - serenade.git/commitdiff
bsd make
authornishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 23 Apr 2024 02:03:18 +0000 (02:03 +0000)
committernishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 23 Apr 2024 02:03:18 +0000 (02:03 +0000)
git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@2 0f02c867-ac3d-714e-8a88-971ba1f6efcf

Makefile [new file with mode: 0644]
Serenade/Makefile [new file with mode: 0644]
Serenade/main.c [new file with mode: 0644]
Tool/Makefile [new file with mode: 0644]
Tool/configgen.c [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..e9ef2fb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+# $Id$
+
+CC = cc
+CFLAGS = -std=c99
+LDFLAGS =
+LIBS =
+SUFFIX =
+
+.PHONY: all ./Serenade
+
+all: ./Tool ./Serenade
+
+./Tool::
+       $(MAKE) -C ./Tool CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" SUFFIX="$(SUFFIX)"
+
+./Serenade::
+       $(MAKE) -C ./Serenade CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" SUFFIX="$(SUFFIX)"
+
+clean:
+       $(MAKE) -C ./Tool clean
+       $(MAKE) -C ./Serenade clean
diff --git a/Serenade/Makefile b/Serenade/Makefile
new file mode 100644 (file)
index 0000000..e303649
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+SERENADE_OBJS = main.o
+
+.PHONY: all clean
+.SUFFIXES: .o .c
+
+all: ./serenade$(SUFFIX)
+
+./serenade$(SUFFIX): $(SERENADE_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(SERENADE_OBJS) $(LIBS)
+
+.c.o:
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+       rm -f *.o ./serenade ./serenade.exe
diff --git a/Serenade/main.c b/Serenade/main.c
new file mode 100644 (file)
index 0000000..0ef49a8
--- /dev/null
@@ -0,0 +1,3 @@
+/* $Id$ */
+
+int main(){}
diff --git a/Tool/Makefile b/Tool/Makefile
new file mode 100644 (file)
index 0000000..197d32f
--- /dev/null
@@ -0,0 +1,17 @@
+ # $Id$
+
+CONFIGGEN_OBJS = configgen.o
+
+.PHONY: all clean
+.SUFFIXES: .o .c
+
+all: ./configgen
+
+./configgen: $(CONFIGGEN_OBJS)
+       cc -o $@ $(CONFIGGEN_OBJS)
+
+.c.o:
+       cc -c -o $@ $<
+
+clean:
+       rm -f *.o ./configgen ./configgen.exe
diff --git a/Tool/configgen.c b/Tool/configgen.c
new file mode 100644 (file)
index 0000000..d582ac4
--- /dev/null
@@ -0,0 +1,3 @@
+#include <stdio.h>
+
+int main(){}