From cec38774f48a19cf2cf47a43ca452b8f84a63e5f Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 23 Aug 2018 15:20:02 +0300 Subject: [PATCH] glide3x, tests: sbench depends on fxos.o for non-linux. --- glide3x/cvg/glide3/tests/Makefile.DJ | 11 ++++++++--- glide3x/cvg/glide3/tests/Makefile.linux | 6 ++++-- glide3x/cvg/glide3/tests/Makefile.wat | 10 +++++++--- glide3x/cvg/glide3/tests/Makefile.win32 | 10 +++++++--- glide3x/h3/glide3/tests/Makefile.DJ | 20 ++++++++++++++++---- glide3x/h3/glide3/tests/Makefile.linux | 5 ++++- glide3x/h3/glide3/tests/Makefile.wat | 8 +++++++- glide3x/h3/glide3/tests/Makefile.win32 | 8 +++++++- glide3x/h5/glide3/tests/Makefile.DJ | 11 ++++++++--- glide3x/h5/glide3/tests/Makefile.linux | 5 ++++- glide3x/h5/glide3/tests/Makefile.mgw | 8 +++++++- glide3x/h5/glide3/tests/Makefile.wat | 8 +++++++- glide3x/sst1/glide3/tests/Makefile.DJ | 11 ++++++++--- glide3x/sst1/glide3/tests/Makefile.linux | 5 ++++- glide3x/sst1/glide3/tests/Makefile.wat | 9 +++++++-- glide3x/sst1/glide3/tests/Makefile.win32 | 9 +++++++-- 16 files changed, 112 insertions(+), 32 deletions(-) diff --git a/glide3x/cvg/glide3/tests/Makefile.DJ b/glide3x/cvg/glide3/tests/Makefile.DJ index 223cdd8..0be29ef 100644 --- a/glide3x/cvg/glide3/tests/Makefile.DJ +++ b/glide3x/cvg/glide3/tests/Makefile.DJ @@ -18,10 +18,9 @@ # build a specific file # - -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe -.SECONDARY: tlib.o +.SECONDARY: tlib.o fxos.o FX_GLIDE_HW = cvg TOP = ../../.. @@ -52,6 +51,12 @@ endif all: $(error Must specify to build) +sbench.exe: sbench.o fxos.o tlib.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.o: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -o $@ $(CFLAGS) -c $< + clean: -$(call UNLINK,*.o) -$(call UNLINK,*.exe) diff --git a/glide3x/cvg/glide3/tests/Makefile.linux b/glide3x/cvg/glide3/tests/Makefile.linux index 514d037..6df896f 100644 --- a/glide3x/cvg/glide3/tests/Makefile.linux +++ b/glide3x/cvg/glide3/tests/Makefile.linux @@ -16,8 +16,7 @@ # build a specific file # - -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe .SECONDARY: tlib.o linutil.o @@ -47,3 +46,6 @@ all: linutil.o: $(TOP)/swlibs/fxmisc/linutil.c $(CC) -o $@ $(CFLAGS) -c $< +clean: + rm -f *.o + rm -f *.exe diff --git a/glide3x/cvg/glide3/tests/Makefile.wat b/glide3x/cvg/glide3/tests/Makefile.wat index 11ec1b8..5a491b5 100644 --- a/glide3x/cvg/glide3/tests/Makefile.wat +++ b/glide3x/cvg/glide3/tests/Makefile.wat @@ -6,7 +6,6 @@ # Web : http://www.geocities.com/dborca # - # # Available options: # @@ -20,10 +19,9 @@ # build a specific file # - .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW = cvg TOP = ../../.. @@ -57,3 +55,9 @@ export WCL386 = -zq all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS)) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -fo=$@ -c $< diff --git a/glide3x/cvg/glide3/tests/Makefile.win32 b/glide3x/cvg/glide3/tests/Makefile.win32 index 9343a47..930ece1 100644 --- a/glide3x/cvg/glide3/tests/Makefile.win32 +++ b/glide3x/cvg/glide3/tests/Makefile.win32 @@ -6,7 +6,6 @@ # Web : http://www.geocities.com/dborca # - # # Available options: # @@ -20,10 +19,9 @@ # build a specific file # - .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW ?= cvg TOP = ../../.. @@ -46,3 +44,9 @@ LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -Fo$@ $(CFLAGS) -c $< diff --git a/glide3x/h3/glide3/tests/Makefile.DJ b/glide3x/h3/glide3/tests/Makefile.DJ index ab07a56..3e7ad46 100644 --- a/glide3x/h3/glide3/tests/Makefile.DJ +++ b/glide3x/h3/glide3/tests/Makefile.DJ @@ -18,14 +18,16 @@ # build a specific file # -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe -.SECONDARY: tlib.o +.SECONDARY: tlib.o fxos.o FX_GLIDE_HW = h3 TOP = ../../.. CPU ?= pentium +UNLINK = rm -f $(1) + CC = gcc CFLAGS = -Wall -O2 -ffast-math -mtune=$(CPU) CFLAGS += -I$(TOP)/$(FX_GLIDE_HW)/glide3/src -I$(TOP)/$(FX_GLIDE_HW)/incsrc @@ -36,9 +38,9 @@ CFLAGS += -D__DOS32__ LDFLAGS = -s -L$(TOP)/$(FX_GLIDE_HW)/lib ifdef DXE -LDLIBS = -lgld3i +LDLIBS = -lglide3i else -LDLIBS = -lgld3x +LDLIBS = -lglide3x endif .c.o: @@ -48,3 +50,13 @@ endif all: $(error Must specify to build) + +sbench.exe: sbench.o fxos.o tlib.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.o: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -o $@ $(CFLAGS) -c $< + +clean: + -$(call UNLINK,*.o) + -$(call UNLINK,*.exe) diff --git a/glide3x/h3/glide3/tests/Makefile.linux b/glide3x/h3/glide3/tests/Makefile.linux index 0598630..eba6eca 100644 --- a/glide3x/h3/glide3/tests/Makefile.linux +++ b/glide3x/h3/glide3/tests/Makefile.linux @@ -20,7 +20,7 @@ # build a specific file # -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe .SECONDARY: tlib.o linutil.o @@ -54,3 +54,6 @@ all: linutil.o: $(TOP)/swlibs/fxmisc/linutil.c $(CC) -o $@ $(CFLAGS) -c $< +clean: + rm -f *.o + rm -f *.exe diff --git a/glide3x/h3/glide3/tests/Makefile.wat b/glide3x/h3/glide3/tests/Makefile.wat index d1bf26d..bcf7970 100644 --- a/glide3x/h3/glide3/tests/Makefile.wat +++ b/glide3x/h3/glide3/tests/Makefile.wat @@ -21,7 +21,7 @@ .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW = h3 TOP = ../../.. @@ -55,3 +55,9 @@ export WCL386 = -zq all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS)) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -fo=$@ -c $< diff --git a/glide3x/h3/glide3/tests/Makefile.win32 b/glide3x/h3/glide3/tests/Makefile.win32 index 24a2f80..6b92bb0 100644 --- a/glide3x/h3/glide3/tests/Makefile.win32 +++ b/glide3x/h3/glide3/tests/Makefile.win32 @@ -21,7 +21,7 @@ .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW ?= h3 TOP = ../../.. @@ -44,3 +44,9 @@ LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_GLIDE_HW)/lib/glide3x.lib all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -Fo$@ $(CFLAGS) -c $< diff --git a/glide3x/h5/glide3/tests/Makefile.DJ b/glide3x/h5/glide3/tests/Makefile.DJ index ddf9848..38348e2 100644 --- a/glide3x/h5/glide3/tests/Makefile.DJ +++ b/glide3x/h5/glide3/tests/Makefile.DJ @@ -18,10 +18,9 @@ # build a specific file # - -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe -.SECONDARY: tlib.o +.SECONDARY: tlib.o fxos.o FX_GLIDE_HW = h5 TOP = ../../.. @@ -53,6 +52,12 @@ endif all: $(error Must specify to build) +sbench.exe: sbench.o fxos.o tlib.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.o: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -o $@ $(CFLAGS) -c $< + clean: -$(call UNLINK,*.o) -$(call UNLINK,*.exe) diff --git a/glide3x/h5/glide3/tests/Makefile.linux b/glide3x/h5/glide3/tests/Makefile.linux index d931d84..72cf69d 100644 --- a/glide3x/h5/glide3/tests/Makefile.linux +++ b/glide3x/h5/glide3/tests/Makefile.linux @@ -20,7 +20,7 @@ # build a specific file # -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe .SECONDARY: tlib.o linutil.o @@ -55,3 +55,6 @@ all: linutil.o: $(TOP)/swlibs/fxmisc/linutil.c $(CC) -o $@ $(CFLAGS) -c $< +clean: + rm -f *.o + rm -f *.exe diff --git a/glide3x/h5/glide3/tests/Makefile.mgw b/glide3x/h5/glide3/tests/Makefile.mgw index 7ba8d3e..309b4ca 100644 --- a/glide3x/h5/glide3/tests/Makefile.mgw +++ b/glide3x/h5/glide3/tests/Makefile.mgw @@ -18,7 +18,7 @@ .PHONY: all .SUFFIXES: .c .o .exe -.SECONDARY: tlib.o +.SECONDARY: tlib.o fxos.o FX_GLIDE_HW = h5 TOP = ../../.. @@ -42,3 +42,9 @@ LDLIBS = -lgdi32 -lglide3x all: $(error Must specify to build) + +sbench.exe: sbench.o fxos.o tlib.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.o: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -o $@ $(CFLAGS) -c $< diff --git a/glide3x/h5/glide3/tests/Makefile.wat b/glide3x/h5/glide3/tests/Makefile.wat index f9e1eaf..d706336 100644 --- a/glide3x/h5/glide3/tests/Makefile.wat +++ b/glide3x/h5/glide3/tests/Makefile.wat @@ -21,7 +21,7 @@ .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW = h5 TOP = ../../.. @@ -55,3 +55,9 @@ export WCL386 = -zq all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS)) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -fo=$@ -c $< diff --git a/glide3x/sst1/glide3/tests/Makefile.DJ b/glide3x/sst1/glide3/tests/Makefile.DJ index 3561058..28f921b 100644 --- a/glide3x/sst1/glide3/tests/Makefile.DJ +++ b/glide3x/sst1/glide3/tests/Makefile.DJ @@ -20,10 +20,9 @@ # build a specific file # - -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe -.SECONDARY: tlib.o +.SECONDARY: tlib.o fxos.o FX_GLIDE_HW ?= sst1 ifeq ($(FX_GLIDE_HW),sst1) @@ -63,6 +62,12 @@ endif all: $(error Must specify to build) +sbench.exe: sbench.o fxos.o tlib.o + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.o: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -o $@ $(CFLAGS) -c $< + clean: -$(call UNLINK,*.o) -$(call UNLINK,*.exe) diff --git a/glide3x/sst1/glide3/tests/Makefile.linux b/glide3x/sst1/glide3/tests/Makefile.linux index 86a5928..772ab72 100644 --- a/glide3x/sst1/glide3/tests/Makefile.linux +++ b/glide3x/sst1/glide3/tests/Makefile.linux @@ -21,7 +21,7 @@ # -.PHONY: all +.PHONY: all clean .SUFFIXES: .c .o .exe .SECONDARY: tlib.o linutil.o @@ -63,3 +63,6 @@ all: linutil.o: $(TOP)/swlibs/fxmisc/linutil.c $(CC) -o $@ $(CFLAGS) -c $< +clean: + rm -f *.o + rm -f *.exe diff --git a/glide3x/sst1/glide3/tests/Makefile.wat b/glide3x/sst1/glide3/tests/Makefile.wat index e24611e..11d73f7 100644 --- a/glide3x/sst1/glide3/tests/Makefile.wat +++ b/glide3x/sst1/glide3/tests/Makefile.wat @@ -21,10 +21,9 @@ # build a specific file # - .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW ?= sst1 ifeq ($(FX_GLIDE_HW),sst1) @@ -67,3 +66,9 @@ export WCL386 = -zq all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS)) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -fo=$@ -c $< diff --git a/glide3x/sst1/glide3/tests/Makefile.win32 b/glide3x/sst1/glide3/tests/Makefile.win32 index d5dc0aa..5cb019f 100644 --- a/glide3x/sst1/glide3/tests/Makefile.win32 +++ b/glide3x/sst1/glide3/tests/Makefile.win32 @@ -19,10 +19,9 @@ # build a specific file # - .PHONY: all .SUFFIXES: .c .obj .exe -.SECONDARY: tlib.obj +.SECONDARY: tlib.obj fxos.obj FX_GLIDE_HW ?= sst1 ifeq ($(FX_GLIDE_HW),sst1) @@ -54,3 +53,9 @@ LDLIBS = user32.lib gdi32.lib $(TOP)/$(FX_HW_BASE)/lib/$(FX_GLIDE_HW)/glide3x.li all: $(error Must specify to build) + +sbench.exe: sbench.obj fxos.obj tlib.obj + $(LD) -out:$@ $(LDFLAGS) $^ $(LDLIBS) + +fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c + $(CC) -Fo$@ $(CFLAGS) -c $<