From 626b541c5fee7a64c7481f494487e0e765fcb0bf Mon Sep 17 00:00:00 2001 From: Mate Kovacs Date: Mon, 10 Feb 2025 14:31:38 +0900 Subject: [PATCH 1/5] add stuff --- .github/workflows/ci.yml | 9 ++ qvlib/src/Makefile.windows | 38 ++++++ subdivide/examples/Makefile.windows | 203 ++++++++++++++++++++++++++++ subdivide/src/Makefile.windows | 180 ++++++++++++++++++++++++ subdivide/viewer/Makefile.windows | 184 +++++++++++++++++++++++++ 5 files changed, 614 insertions(+) create mode 100644 qvlib/src/Makefile.windows create mode 100644 subdivide/examples/Makefile.windows create mode 100644 subdivide/src/Makefile.windows create mode 100644 subdivide/viewer/Makefile.windows diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8827c1a..0bfa8c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,3 +21,12 @@ jobs: - run: '[ -f subdivide/examples/ccsub ]' - run: '[ -f subdivide/examples/loopsub ]' - run: '[ -f subdivide/examples/subviewer ]' + + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - run: make -C subdivide -f Makefile.windows + - run: '[ -f subdivide/examples/ccsub ]' + - run: '[ -f subdivide/examples/loopsub ]' + - run: '[ -f subdivide/examples/subviewer ]' diff --git a/qvlib/src/Makefile.windows b/qvlib/src/Makefile.windows new file mode 100644 index 0000000..2d79fe6 --- /dev/null +++ b/qvlib/src/Makefile.windows @@ -0,0 +1,38 @@ +SHELL = /bin/sh + +CC = gcc +DEPOPTS= -M +DEPLINE= 1> Makedepend.windows + +DEFS = -Wall -std=c++11 +DEBUG = +OPTS = + +INCS = -I ../include + +CCFLAGS=$(INCS) $(DEFS) $(DEBUG) $(OPTS) + +libqv.a: depend QvLib.o + @echo COMPILER $(CC) + ar csr libqv.a QvLib.o + +depend: QvLib.cpp + $(CC) $(CCFLAGS) QvLib.cpp $(DEPOPTS) $(DEPLINE) + +clean: + rm -f *.o *.a Makedepend.windows; touch Makedepend.windows; + +############################################################################## +# extra default rules +############################################################################## + +.SUFFIXES: .cpp + +.cpp.o: + $(CC) $(CCFLAGS) -c $< + +.IGNORE: + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +include Makedepend.windows diff --git a/subdivide/examples/Makefile.windows b/subdivide/examples/Makefile.windows new file mode 100644 index 0000000..f0a8b95 --- /dev/null +++ b/subdivide/examples/Makefile.windows @@ -0,0 +1,203 @@ +############################################################################## +# +# Makefile for examples +# +# +# $Id: Makefile.windows,v 1.4 2000/04/30 07:35:46 dzorin Exp $ +# $Source: /tools/cvs-repos/sig00code/nyuSub/examples/Makefile.windows,v $ +# +############################################################################## + + +############################################################################## +# This file defines the following targets: +# =========================================================================== +# or all: makes your application. +# +# clean: removes all the usual stuff (if your Makefile is checked in, it will +# be removed too... you might then want to do a "co Makefile") +# +############################################################################## + +SHELL = /bin/sh +############################################################################## +# Application file definitions -- EDIT THESE +############################################################################## + +# You may need to make sub-definitions for these definitions if you have +# multiple languages, or other requirements. + +# All your source files +SWSRCS= + +SRCS=$(SWSRCS) $(ARCHSRCS) + +# C-language source, to compile with cc +SWCSRCS= + +CSRCS=$(SWCSRCS) $(ARCHCSRCS) +# source files with no associated .o +SRCSNOO= + +HDRSNOS= + +# sources that are #include'd, and have no associated .o +TABLESRCS= + +ALLSRCS=$(SRCSNOH) $(CSRCS) $(SRCS) $(SRCSNOO) $(TABLESRCS) + +# All the local .h files (these are not automatically depended) +HDRS=$(HDRSNOS) ${SRCS:.cpp=.h} ${CSRCS:.c=.h} ${SRCSNOO:.cpp=.h} + +# All .o files generated +COBJS=${CSRCS:.c=.o} +OBJS= $(COBJS) ${SRCS:.cpp=.o} +ALLOBJS=$(OBJS) ${SRCSNOH:.cpp=.o} +PROTOOBJS = ${PROTOS:.cpp=.o} + +# Man pages, etc. (leave blank if none) +DOCS= + + + + +############################################################################## +# Application-specific definitions -- EDIT THESE +############################################################################## + +DEFS= + +#include directories +INCS= -I. -I../include -I/usr/X11R6/include + +# other C and C++ common options + +# CC options + +INOPTS= #-DNDEBUG -Ofast +DEBUGOPTS= -g + + +OPTS= $(INOPTS) $(DEBUGOPTS) + +# C specific options +COPTS= + +# C++ specific options +CCOPTS= -Wall -pedantic -std=c++11 + +DEPOPTS= -M -I.. + +DEPLINE= 1> Makedepend.windows + +# linker options + +LIBS= -L/usr/X11R6/lib -L../../qvlib/src -L../src -lsub -lqv -lm -lstdc++ + +VIEWERLIBS= -L../viewer -lviewer -lglut -lGLU -lGL -lX11 -lXmu + +# ---------------------------------------------------------------------------- +# -- You shouldn't need to edit anything below here, unless you have more +# -- than one target or are building a library, or you're doing something +# -- nonstandard. +# ---------------------------------------------------------------------------- + +############################################################################## +# Language definitions +############################################################################## + +CFLAGS= $(INCS) $(DEFS) $(DEBUG) $(OPTS) $(COPTS) +CCFLAGS=$(INCS) $(DEFS) $(DEBUG) $(OPTS) $(CCOPTS) + +CC=gcc +cc=gcc + +TARGET_COMPILER_FLAGS=$(CCFLAGS) $(LIBOPTS) +TARGET_COMPILER=$(CC) + +############################################################################## +# extra default rules +############################################################################## + +.SUFFIXES: .C .cpp .c .sl .slo + +.cpp: + $(CC) $(CCFLAGS) -o $@ $< + +.C: + $(CC) $(CFLAGS) -o $@ $< + +.c: + $(cc) $(CFLAGS) -o $@ $< + +.C.o: + $(CC) $(CCFLAGS) -c $< + +.cpp.o: + $(CC) $(CCFLAGS) -c $< + +.c.o: + $(cc) $(CFLAGS) -c $< + +.sl: + $(SHADECOM) $@ $< + +.sl.slo: + $(SHADECOM) $< + + + +TARGETS=subviewer loopsub ccsub +all: qvlib libsub libviewer $(TARGETS) + + +############################################################################## +# Application-specific rules and dependencies - may need editing +############################################################################## +qvlib: + cd ../../qvlib/src; make -f Makefile.windows CC=$(CC) cc=$(cc) +libsub: + cd ../src; make -f Makefile.windows CC=$(CC) cc=$(cc) + +libviewer: + cd ../viewer; make -f Makefile.windows CC=$(CC) cc=$(cc) + + +subviewer: subviewer.o ../viewer/libviewer.a ../src/libsub.a + @echo Compiling $@ + $(TARGET_COMPILER) -o subviewer $(TARGET_COMPILER_FLAGS) \ + subviewer.o $(ALLOBJS) $(VIEWERLIBS) $(LIBS) + @echo $@ is made. + + +loopsub: loopsub.o ../viewer/libviewer.a ../src/libsub.a + @echo Compiling $@ + $(TARGET_COMPILER) -o loopsub $(TARGET_COMPILER_FLAGS) \ + loopsub.o $(ALLOBJS) $(LIBS) + @echo $@ is made. + +ccsub: ccsub.o ../viewer/libviewer.a ../src/libsub.a + @echo Compiling $@ + $(TARGET_COMPILER) -o ccsub $(TARGET_COMPILER_FLAGS) \ + ccsub.o $(ALLOBJS) $(LIBS) + @echo $@ is made. + +############################################################################## +# General-purpose targets - do not edit, in general: +############################################################################## + + +clean: + rm -f $(TARGETS) $(OBJS) *.slo *.o *~ *.s \ + *.a *..c ptrepository/* TAGS \ + core a.out \#* *.bak *.BAK *.CKP \ + *.l *.Addrs *.Counts *.pixie .\#* \ + loopsub ccsub; + rm -rf ii_files; + rm -f Makedepend.windows; touch Makedepend.windows + +.IGNORE: + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +include Makedepend.windows diff --git a/subdivide/src/Makefile.windows b/subdivide/src/Makefile.windows new file mode 100644 index 0000000..51ec603 --- /dev/null +++ b/subdivide/src/Makefile.windows @@ -0,0 +1,180 @@ +############################################################################## +# +# Makefile for libsub +# +# +# $Id: Makefile.windows,v 1.7 2001/02/07 05:55:26 biermann Exp $ +# $Source: /tools/cvs-repos/sig00code/nyuSub/src/Makefile.windows,v $ +# +############################################################################## + +SHELL = /bin/sh +############################################################################## +# Application file definitions -- EDIT THESE +############################################################################## + +# You may need to make sub-definitions for these definitions if you have +# multiple languages, or other requirements. + +# All your source files + +SWSRCS= flatmesh.cpp \ + tagflatmesh.cpp \ + trirule.cpp \ + quadrule.cpp \ + ivgraph.cpp \ + tagivgraph.cpp \ + subtri.cpp \ + subquad.cpp \ + trimesh.cpp \ + quadmesh.cpp \ + quadmanipulator.cpp \ + trimanipulator.cpp + +SRCS=$(SWSRCS) $(ARCHSRCS) + +# C-language source, to compile with cc +SWCSRCS= + +CSRCS=$(SWCSRCS) $(ARCHCSRCS) +# source files with no associated .o +SRCSNOO= + + +# source files with no associated .h +SRCSNOH= + +HDRSNOS= + +# sources that are #include'd, and have no associated .o +TABLESRCS= + +ALLSRCS=$(SRCSNOH) $(CSRCS) $(SRCS) $(SRCSNOO) $(TABLESRCS) + +# All the local .h files (these are not automatically depended) +HDRS=$(HDRSNOS) ${SRCS:.cpp=.h} ${CSRCS:.c=.h} ${SRCSNOO:.cpp=.h} + +# All .o files generated +COBJS=${CSRCS:.c=.o} +OBJS= $(COBJS) ${SRCS:.cpp=.o} +ALLOBJS=$(OBJS) ${SRCSNOH:.cpp=.o} +PROTOOBJS = ${PROTOS:.cpp=.o} + +# Man pages, etc. (leave blank if none) +DOCS= + +# Application name +TARGET= libsub.a + +DEFS = + +#include directories +INCS = -I. -I../include -I../template -I../../qvlib/include + +# other C and C++ common options + +# CC options +INOPTS= -Wall -pedantic -std=c++11 +DEBUGOPTS= -g + + +OPTS= $(INOPTS) $(DEBUGOPTS) + +# C specific options +COPTS= + +# C++ specific options +CCOPTS= + +# linker options + +LIBS= + +DEPOPTS= -M -I.. + +DEPLINE= 1> Makedepend.windows + + +# ---------------------------------------------------------------------------- +# -- You shouldn't need to edit anything below here, unless you have more +# -- than one target or are building a library, or you're doing something +# -- nonstandard. +# ---------------------------------------------------------------------------- + +############################################################################## +# Language definitions +############################################################################## + +CFLAGS= $(INCS) $(DEFS) $(DEBUG) $(OPTS) $(COPTS) +CCFLAGS=$(INCS) $(DEFS) $(DEBUG) $(OPTS) $(CCOPTS) + +CC=gcc +cc=gcc + +TARGET_COMPILER_FLAGS=$(CCFLAGS) $(LIBOPTS) +TARGET_COMPILER=$(CC) + +############################################################################## +# extra default rules +############################################################################## + +.SUFFIXES: .C .cpp .c .sl .slo + +.cpp: + $(CC) $(CCFLAGS) -o $@ $< + +.C: + $(CC) $(CFLAGS) -o $@ $< + +.c: + $(cc) $(CFLAGS) -o $@ $< + +.C.o: + $(CC) $(CCFLAGS) -c $< + +.cpp.o: + $(CC) $(CCFLAGS) -c $< + +.c.o: + $(cc) $(CFLAGS) -c $< + +.sl: + $(SHADECOM) $@ $< + +.sl.slo: + $(SHADECOM) $< + + +# This rule must be first. It insures that the desired target is the default. + +all: depend $(TARGET) + + +############################################################################## +# Application-specific rules and dependencies - may need editing +############################################################################## +$(TARGET): $(ALLOBJS) + @echo COMPILER $(CC) + ar csr $(TARGET) $(ALLOBJS) + @echo $@ is made. + + +############################################################################## +# General-purpose targets - do not edit, in general: +############################################################################## + +depend: $(ALLSRCS) + $(CC) $(CCFLAGS) $(DEPOPTS) $(ALLSRCS) $(DEPLINE) + +clean: + rm -f $(TARGET) $(OBJS) *.slo *.o *~ *.s \ + *.a *..c ptrepository/* TAGS \ + core a.out \#* *.bak *.BAK *.CKP \ + *.l *.Addrs *.Counts *.pixie .\#*; + rm -f Makedepend.windows; touch Makedepend.windows + +.IGNORE: + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +include Makedepend.windows diff --git a/subdivide/viewer/Makefile.windows b/subdivide/viewer/Makefile.windows new file mode 100644 index 0000000..09c33ee --- /dev/null +++ b/subdivide/viewer/Makefile.windows @@ -0,0 +1,184 @@ +############################################################################## +# +# Makefile for libviewer +# +# +# $Id: Makefile.windows,v 1.2 2000/04/30 07:35:48 dzorin Exp $ +# $Source: /tools/cvs-repos/sig00code/nyuSub/viewer/Makefile.windows,v $ +# +############################################################################## + +SHELL = /bin/sh +############################################################################## +# Application file definitions -- EDIT THESE +############################################################################## + +# You may need to make sub-definitions for these definitions if you have +# multiple languages, or other requirements. + +# All your source files +SWSRCS= arcball.cpp \ + ballviewer.cpp \ + camera.cpp \ + geoobject.cpp \ + pickobject.cpp \ + pickviewer.cpp \ + pickableparam.cpp \ + pickabletri.cpp \ + pickablequad.cpp \ + viewer.cpp \ + pickobject.cpp + + +SRCS=$(SWSRCS) $(ARCHSRCS) + +# C-language source, to compile with cc +SWCSRCS= + +CSRCS=$(SWCSRCS) $(ARCHCSRCS) +# source files with no associated .o +SRCSNOO= + + +# source files with no associated .h +SRCSNOH= + +HDRSNOS= + +# sources that are #include'd, and have no associated .o +TABLESRCS= + +ALLSRCS=$(SRCSNOH) $(CSRCS) $(SRCS) $(SRCSNOO) $(TABLESRCS) + +# All the local .h files (these are not automatically depended) +HDRS=$(HDRSNOS) ${SRCS:.cpp=.h} ${CSRCS:.c=.h} ${SRCSNOO:.cpp=.h} + +# All .o files generated +COBJS=${CSRCS:.c=.o} +OBJS= $(COBJS) ${SRCS:.cpp=.o} +ALLOBJS=$(OBJS) ${SRCSNOH:.cpp=.o} +PROTOOBJS = ${PROTOS:.cpp=.o} + +# Man pages, etc. (leave blank if none) +DOCS= + +# Application name +TARGET= libviewer.a + +############################################################################## +# Application-specific definitions -- EDIT THESE +############################################################################## + +DEFS= + +#include directories +INCS = -I. -I../template -I../include -I../../qvlib/include -I/usr/X11R6/include + +# other C and C++ common options + +# CC options +INOPTS= +#-DNDEBUG -O3 +DEBUGOPTS= -g + + +OPTS= $(INOPTS) $(DEBUGOPTS) + +# C specific options +COPTS= + +# C++ specific options +CCOPTS= -Wall -pedantic -std=c++11 + +# linker options +LIBS= + + +DEPOPTS= -M -I.. + +DEPLINE= 1> Makedepend.windows + +# ---------------------------------------------------------------------------- +# -- You shouldn't need to edit anything below here, unless you have more +# -- than one target or are building a library, or you're doing something +# -- nonstandard. +# ---------------------------------------------------------------------------- + +############################################################################## +# Language definitions +############################################################################## + +CFLAGS= $(INCS) $(DEFS) $(DEBUG) $(OPTS) $(COPTS) +CCFLAGS=$(INCS) $(DEFS) $(DEBUG) $(OPTS) $(CCOPTS) + +CC=gcc +cc=gcc + +TARGET_COMPILER_FLAGS=$(CCFLAGS) $(LIBOPTS) +TARGET_COMPILER=$(CC) + +############################################################################## +# extra default rules +############################################################################## + +.SUFFIXES: .C .cpp .c .sl .slo + +.cpp: + $(CC) $(CCFLAGS) -o $@ $< + +.C: + $(CC) $(CFLAGS) -o $@ $< + +.c: + $(cc) $(CFLAGS) -o $@ $< + +.C.o: + $(CC) $(CCFLAGS) -c $< + +.cpp.o: + $(CC) $(CCFLAGS) -c $< + +.c.o: + $(cc) $(CFLAGS) -c $< + +.sl: + $(SHADECOM) $@ $< + +.sl.slo: + $(SHADECOM) $< + + +# This rule must be first. It insures that the desired target is the default. + +all: depend $(TARGET) + + +############################################################################## +# Application-specific rules and dependencies - may need editing +############################################################################## + +$(TARGET): $(ALLOBJS) + @echo COMPILER $(CC) + ar csr $(TARGET) $(ALLOBJS) + @echo $@ is made. + +############################################################################## +# General-purpose targets - do not edit, in general: +############################################################################## + +depend: $(ALLSRCS) + $(CC) $(CCFLAGS) $(DEPOPTS) $(ALLSRCS) $(DEPLINE) + +clean: + rm -f $(TARGET) $(OBJS) *.slo *.o *~ *.s \ + *.a *..c ptrepository/* TAGS \ + core a.out \#* *.bak *.BAK *.CKP \ + *.l *.Addrs *.Counts *.pixie .\#*; + rm -rf ii_files; + rm -f Makedepend.windows; touch Makedepend.windows + +.IGNORE: + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +include Makedepend.windows From 901940477b884dc2b0df8eed264d39f52c472f32 Mon Sep 17 00:00:00 2001 From: Mate Kovacs Date: Mon, 10 Feb 2025 14:33:39 +0900 Subject: [PATCH 2/5] meh --- subdivide/Makefile.windows | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 subdivide/Makefile.windows diff --git a/subdivide/Makefile.windows b/subdivide/Makefile.windows new file mode 100644 index 0000000..5a273af --- /dev/null +++ b/subdivide/Makefile.windows @@ -0,0 +1,18 @@ +############################################################################## +# +# Makefile for Subdivide +# +# +# $Id: Makefile.windows,v 1.3 2000/04/30 01:39:28 biermann Exp $ +# $Source: /tools/cvs-repos/sig00code/nyuSub/Makefile.windows,v $ +# +############################################################################## +SHELL = /bin/sh + +ENV=windows +DIRS= ../qvlib/src src viewer examples + +all: + ( for i in $(DIRS); do ( cd $$i; touch Makedepend.$(ENV); make -f Makefile.$(ENV) ); done ) +clean: + ( for i in $(DIRS); do ( cd $$i; touch Makedepend.$(ENV); make -f Makefile.$(ENV) clean ); done ) From 170dfb0e3254de7f1c8703d8a8957a18d03dbcab Mon Sep 17 00:00:00 2001 From: Mate Kovacs Date: Tue, 11 Feb 2025 00:06:05 +0900 Subject: [PATCH 3/5] powershell stuff --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bfa8c2..0214cec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - run: make -C subdivide -f Makefile.windows - - run: '[ -f subdivide/examples/ccsub ]' - - run: '[ -f subdivide/examples/loopsub ]' - - run: '[ -f subdivide/examples/subviewer ]' + - run: 'Test-Path -Path "subdivide/examples/ccsub" -Leaf' + - run: 'Test-Path -Path "subdivide/examples/loopsub" -Leaf' + - run: 'Test-Path -Path "subdivide/examples/subviewer" -Leaf' From d473b5aeed523cef570de9e427220330dbbf7857 Mon Sep 17 00:00:00 2001 From: Mate Kovacs Date: Tue, 11 Feb 2025 00:12:03 +0900 Subject: [PATCH 4/5] fix fix fix --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0214cec..8d2ffc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - run: make -C subdivide -f Makefile.windows - - run: 'Test-Path -Path "subdivide/examples/ccsub" -Leaf' - - run: 'Test-Path -Path "subdivide/examples/loopsub" -Leaf' - - run: 'Test-Path -Path "subdivide/examples/subviewer" -Leaf' + - run: 'Test-Path -Path "subdivide\examples\ccsub" -PathType leaf' + - run: 'Test-Path -Path "subdivide\examples\loopsub" -PathType leaf' + - run: 'Test-Path -Path "subdivide\examples\subviewer" -PathType leaf' From 665ffbcce28edd96bacc0797a5e0e6b942cd1d54 Mon Sep 17 00:00:00 2001 From: Mate Kovacs Date: Tue, 11 Feb 2025 00:18:42 +0900 Subject: [PATCH 5/5] actually fail on false --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d2ffc8..629b084 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - run: make -C subdivide -f Makefile.windows - - run: 'Test-Path -Path "subdivide\examples\ccsub" -PathType leaf' - - run: 'Test-Path -Path "subdivide\examples\loopsub" -PathType leaf' - - run: 'Test-Path -Path "subdivide\examples\subviewer" -PathType leaf' + - run: 'If (!(Test-Path -Path "subdivide\examples\ccsub" -PathType Leaf)) { exit 1 }' + - run: 'If (!(Test-Path -Path "subdivide\examples\loopsub" -PathType Leaf)) { exit 1 }' + - run: 'If (!(Test-Path -Path "subdivide\examples\subviewer" -PathType Leaf)) { exit 1 }'