changeset 718:1ab9b538c0bb default tip

Rename Makefile.gen to Makefile.common
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 03 Aug 2023 19:17:58 +0300
parents 183818be0d83
children
files Makefile.common Makefile.cross-mingw Makefile.gen Makefile.unix
diffstat 4 files changed, 48 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.common	Thu Aug 03 19:17:58 2023 +0300
@@ -0,0 +1,46 @@
+###
+### Main makefile
+###
+CFLAGS += -g -W -Wall -Wextra -I.
+CFLAGS += -O2
+CFLAGS += -std=c11 -pedantic -D_XOPEN_SOURCE=500
+THLIBS=th-libs/
+
+#
+# Version strings
+#
+NN_VERSION := $(shell cat VERSION)
+comma:= ,
+NN_VERSION_COM := $(subst .,$(comma),$(NN_VERSION))
+CFLAGS += -DNN_VERSION=\"$(NN_VERSION)\"
+
+#
+# Objects
+#
+THLIBS_A=$(OBJPATH)thlibs.a
+THLIBS_OBJ=th_util.o th_string.o th_args.o th_file.o th_config.o \
+	th_network.o th_datastruct.o th_ioctx.o th_ioctx_stdio.o
+
+NNCHAT_OBJ=main.o util.o ui.o
+NNCHAT_BIN=$(BINPATH)nnchat$(BINEXT)
+
+TARGETS += $(NNCHAT_BIN)
+
+include $(THLIBS)/Makefile.inc
+
+#
+# Target rules
+#
+main.c: VERSION
+
+$(NNCHAT_BIN): $(addprefix $(OBJPATH),$(NNCHAT_OBJ)) $(THLIBS_A) $(EXTRAOBJS)
+	$(call LINK_C_BIN,)
+
+
+#
+# Documentation
+#
+$(DOC):
+	@cat doc/index.html | tr '\n' '§' | sed "s/<.-- BEGIN -->.*<.-- END -->//g;s/<script.*<\/script>//g" | tr '§' '\n' > "$@.tmp"
+	@links -dump "$@.tmp" > $@
+
--- a/Makefile.cross-mingw	Sun Jul 02 03:21:18 2023 +0300
+++ b/Makefile.cross-mingw	Thu Aug 03 19:17:58 2023 +0300
@@ -53,7 +53,7 @@
 EXTRAOBJS = $(OBJPATH)resource.o
 ICON = resource.ico
 
-include Makefile.gen
+include Makefile.common
 
 $(OBJPATH)resource.rc: resource.rc.in $(ICON) VERSION
 	sed -e "s/@VERSION@/$(NN_VERSION)/g;s/@VERSION_COM@/$(NN_VERSION_COM)/g;s/@ICON@/$(ICON)/g;s#@EXE@#$(notdir $(NNCHAT_BIN))#g" < $< > $@
--- a/Makefile.gen	Sun Jul 02 03:21:18 2023 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-###
-### Main makefile
-###
-CFLAGS += -g -W -Wall -Wextra -I.
-CFLAGS += -O2
-CFLAGS += -std=c11 -pedantic -D_XOPEN_SOURCE=500
-THLIBS=th-libs/
-
-#
-# Version strings
-#
-NN_VERSION := $(shell cat VERSION)
-comma:= ,
-NN_VERSION_COM := $(subst .,$(comma),$(NN_VERSION))
-CFLAGS += -DNN_VERSION=\"$(NN_VERSION)\"
-
-#
-# Objects
-#
-THLIBS_A=$(OBJPATH)thlibs.a
-THLIBS_OBJ=th_util.o th_string.o th_args.o th_file.o th_config.o \
-	th_network.o th_datastruct.o th_ioctx.o th_ioctx_stdio.o
-
-NNCHAT_OBJ=main.o util.o ui.o
-NNCHAT_BIN=$(BINPATH)nnchat$(BINEXT)
-
-TARGETS += $(NNCHAT_BIN)
-
-include $(THLIBS)/Makefile.inc
-
-#
-# Target rules
-#
-main.c: VERSION
-
-$(NNCHAT_BIN): $(addprefix $(OBJPATH),$(NNCHAT_OBJ)) $(THLIBS_A) $(EXTRAOBJS)
-	$(call LINK_C_BIN,)
-
-
-#
-# Documentation
-#
-$(DOC):
-	@cat doc/index.html | tr '\n' '§' | sed "s/<.-- BEGIN -->.*<.-- END -->//g;s/<script.*<\/script>//g" | tr '§' '\n' > "$@.tmp"
-	@links -dump "$@.tmp" > $@
-
--- a/Makefile.unix	Sun Jul 02 03:21:18 2023 +0300
+++ b/Makefile.unix	Thu Aug 03 19:17:58 2023 +0300
@@ -18,7 +18,7 @@
 NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
 THLIBS_DEP = config.h
 
-include Makefile.gen
+include Makefile.common
 
 
 ##