File tree Expand file tree Collapse file tree 5 files changed +70
-14
lines changed
Expand file tree Collapse file tree 5 files changed +70
-14
lines changed Original file line number Diff line number Diff line change 77
88jobs :
99 build :
10- name : build meshfile library
1110 runs-on : ubuntu-latest
1211
1312 steps :
2423 sudo make install
2524
2625 - name : configure
27- run : ./configure --enable-opt --prefix=$(pwd)/meshfile-build /meshfile-build
26+ run : ./configure --enable-opt --prefix=$(pwd)/staging /meshfile-gnulinux
2827
2928 - name : build
3029 run : make
@@ -38,11 +37,11 @@ jobs:
3837 - name : stage install
3938 run : |
4039 make install-all
41- tree meshfile-build
40+ tree staging
4241
4342 - uses : actions/upload-artifact@v4
4443 with :
45- name : meshfile-build
46- path : meshfile-build
44+ name : meshfile-gnulinux
45+ path : staging
4746
4847# vi:ts=2 sts=2 sw=2 expandtab:
Original file line number Diff line number Diff line change 1+ name : Windows (mingw) build
2+
3+ on :
4+ push :
5+ pull_request :
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : windows-latest
11+ defaults :
12+ run :
13+ shell : msys2 {0}
14+
15+ steps :
16+ - uses : actions/checkout@v3
17+ - uses : msys2/setup-msys2@v2
18+ with :
19+ msystem : MINGW64
20+ install : |
21+ mingw-w64-x86_64-gcc make git mingw-w64-x86_64-freeglut
22+ mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo
23+
24+ - name : install meshview dependencies
25+ run : |
26+ git clone https://github.com/jtsiomb/libimago
27+ cd libimago
28+ ./configure
29+ make
30+ make install
31+
32+ - name : configure
33+ run : ./configure --enable-opt --prefix=$(pwd)/staging/meshfile-mingw64
34+
35+ - name : build
36+ run : make
37+
38+ - name : build meshview
39+ run : |
40+ cd meshview
41+ make CFLAGS='-I../include -I/usr/local/include' LDFLAGS='-L.. -L/usr/local/lib -lmeshfile -lfreeglut -lopengl32 -lglu32 -limago -lpng -ljpeg'
42+
43+ - name : build meshconv
44+ run : make meshconv
45+
46+ - name : stage install
47+ run : |
48+ make install-all
49+
50+ - uses : actions/upload-artifact@v4
51+ with :
52+ name : meshfile-mingw64
53+ path : staging
54+
55+ # vi:ts=2 sts=2 sw=2 expandtab:
Original file line number Diff line number Diff line change @@ -56,18 +56,20 @@ install: $(liba)
5656 cp include/meshfile.h $(DESTDIR )$(PREFIX ) /include/meshfile.h
5757 cp $(liba ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(liba )
5858 cp $(libso ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(libso )
59- rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname )
60- rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname )
61- ln -s $(libso ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname )
62- ln -s $(soname ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname )
59+ [ -n " $( soname) " ] && \
60+ rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname ) && \
61+ rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname ) && \
62+ ln -s $(libso ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname ) && \
63+ ln -s $(soname ) $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname ) || true
6364
6465.PHONY : uninstall
6566uninstall :
6667 rm -f $(DESTDIR )$(PREFIX ) /include/meshfile.h
6768 rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(liba )
6869 rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(libso )
69- rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname )
70- rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname )
70+ [ -n " $( soname) " ] && \
71+ rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(soname ) && \
72+ rm -f $(DESTDIR )$(PREFIX ) /$(libdir ) /$(ldname ) || true
7173
7274
7375.PHONY : tools
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ obj = meshview.o
44
55bin = meshview
66
7- CFLAGS = $(warn ) $(opt ) $(dbg ) -I../include -I$(PREFIX ) /include $(sysincdirs )
8- LDFLAGS = -L.. -L$(PREFIX ) /$(libdir ) -lmeshfile -lglut -lX11 -lXmu -lGL -lGLU -limago -lm
7+ CFLAGS = $(warn ) $(opt ) $(dbg ) -I../include -I$(PREFIX ) /include $(sysincdirs ) $( CFLAGS_cfg )
8+ LDFLAGS = -L.. -L$(PREFIX ) /$(libdir ) $( LDFLAGS_cfg ) -lmeshfile -lglut -lX11 -lXmu -lGL -lGLU -limago -lm
99
1010$(bin ) : $(obj ) ../libmeshfile.a
1111 $(CC ) -o $(bin ) $(obj ) $(LDFLAGS )
Original file line number Diff line number Diff line change 44#include <ctype.h>
55#include "dynarr.h"
66
7- #if defined(_MSC_VER ) || defined(__WATCOMC__ )
7+ #if defined(_WIN32 ) || defined(__WATCOMC__ )
88#include <malloc.h>
99#else
1010#if !defined(__FreeBSD__ ) && !defined(__OpenBSD__ )
You can’t perform that action at this time.
0 commit comments