changeset 2418:8abdd95139d6

Build system cleanups: reordering, more comments.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 14 Jan 2020 03:01:00 +0200
parents 9b4958ef4af2
children 510837da62aa
files Makefile Makefile.cross-mingw Makefile.gen
diffstat 3 files changed, 33 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jan 14 02:44:11 2020 +0200
+++ b/Makefile	Tue Jan 14 03:01:00 2020 +0200
@@ -1,6 +1,6 @@
-#
-# Generic UNIX targets
-#
+###
+### Generic UNIX targets
+###
 DMLIB ?= ./
 BINPATH ?= ./
 OBJPATH ?= ./obj/unix/
--- a/Makefile.cross-mingw	Tue Jan 14 02:44:11 2020 +0200
+++ b/Makefile.cross-mingw	Tue Jan 14 03:01:00 2020 +0200
@@ -1,11 +1,12 @@
-#
-# For Win32/Win64 version cross-compilation via MinGW
-# compiler suite under Linux/Unix
+###
+### For Win32/Win64 version cross-compilation via MinGW
+### compiler suite under Linux/Unix
+###
 #
 # This Makefile assumes that you have MinGW installed under /usr
 # the way Debian MinGW packages do. It also assumes that you have
 # built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under
-# /usr/local in similar fashion.
+# __ /usr/local __ (not /usr!) in similar fashion.
 #
 # For differing configurations you will have to either edit this
 # file or alternatively provide make parameters, e.g.
@@ -49,7 +50,6 @@
 #ZLIB_LDFLAGS ?= $(MINGW_LOCAL_PATH)/lib/libz.a
 ZLIB_LDFLAGS ?= $(MINGW_SYS_PATH)/lib/libz.a
 
-
 TOOL_LDFLAGS ?= -mconsole -lmingw32
 
 include $(DMLIB)Makefile.gen
--- a/Makefile.gen	Tue Jan 14 02:44:11 2020 +0200
+++ b/Makefile.gen	Tue Jan 14 03:01:00 2020 +0200
@@ -27,7 +27,7 @@
 
 
 ###
-### Paths and directories
+### Tools, paths and directories
 ###
 MKDIR ?= mkdir
 MKDIR_P ?= $(MKDIR) -p
@@ -42,7 +42,6 @@
 DMLIB_SRC = $(DMLIB)src/
 
 
-
 ###
 ### Extra debug messages etc?
 ###
@@ -294,6 +293,29 @@
 
 
 ###
+### Main targets and objects
+###
+DMLIB_A = $(OBJPATH)dmlib.a
+DMLIB_OBJS += \
+	dmfile.o dmlib.o dmcurves.o dmstring.o \
+	dmgrowbuf.o dmargs.o dmvecmat.o dmperlin.o \
+	dmimage.o dmengine.o dmfft.o dmzlib.o \
+	dmlicense.o
+
+
+TESTS_TARGETS = $(addprefix $(TESTS_BINPATH),$(addsuffix $(BINEXT),$(TESTS_BINARIES)))
+TOOL_TARGETS = $(addprefix $(TOOL_BINPATH),$(addsuffix $(BINEXT),$(TOOL_BINARIES)))
+
+TARGETS += \
+	$(DMLIB_A) \
+	$(addprefix $(BINPATH),$(addsuffix $(BINEXT),$(BINARIES))) \
+	$(TOOL_TARGETS) $(TESTS_TARGETS)
+
+NOBUILD_TARGETS +=
+NOINST_TARGETS += 
+
+
+###
 ### Functions and compilation/link commands
 ###
 ifneq ($(V),1)
@@ -327,34 +349,11 @@
 
 
 ###
-### Main targets and objects
+### Generic target rules
 ###
-DMLIB_A = $(OBJPATH)dmlib.a
-DMLIB_OBJS += \
-	dmfile.o dmlib.o dmcurves.o dmstring.o \
-	dmgrowbuf.o dmargs.o dmvecmat.o dmperlin.o \
-	dmimage.o dmengine.o dmfft.o dmzlib.o \
-	dmlicense.o
-
-
-TESTS_TARGETS = $(addprefix $(TESTS_BINPATH),$(addsuffix $(BINEXT),$(TESTS_BINARIES)))
-TOOL_TARGETS = $(addprefix $(TOOL_BINPATH),$(addsuffix $(BINEXT),$(TOOL_BINARIES)))
-
-TARGETS += \
-	$(DMLIB_A) \
-	$(addprefix $(BINPATH),$(addsuffix $(BINEXT),$(BINARIES))) \
-	$(TOOL_TARGETS) $(TESTS_TARGETS)
-
-NOBUILD_TARGETS +=
-NOINST_TARGETS += 
-
-
 all: $(NOBUILD_TARGETS) $(NOINST_TARGETS) $(TARGETS)
 
 
-###
-### Generic object rules
-###
 $(OBJPATH)%.o: $(DMLIB)tests/%.c $(DMLIB)tests/%.h
 	$(COMPILE_C_OBJ)