Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add job for Windows #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: '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 }'
38 changes: 38 additions & 0 deletions qvlib/src/Makefile.windows
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions subdivide/Makefile.windows
Original file line number Diff line number Diff line change
@@ -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 )
203 changes: 203 additions & 0 deletions subdivide/examples/Makefile.windows
Original file line number Diff line number Diff line change
@@ -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:
# ===========================================================================
# <null target> 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
Loading
Loading