Skip to content
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
18 changes: 9 additions & 9 deletions Build/LIBS/clang_win/make_LIBS.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,39 @@ set BUILDDIR=%CD%

:: ZLIB
cd %SRCDIR%\zlib131
start %WAIT% makelib %OPTS% -copy libz.lib %LIBDIR%\zlib.lib

start "" cmd /c "makelib %OPTS% -copy libz.lib %LIBDIR%\zlib.lib > %LIBDIR%\zlib.out 2>&1 "
:: JPEG
cd %SRCDIR%\jpeg-9b
start %WAIT% makelib %OPTS% -copy libjpeg.lib %LIBDIR%\jpeg.lib
start "" cmd /c "makelib %OPTS% -copy libjpeg.lib %LIBDIR%\jpeg.lib > %LIBDIR%\jpeg.out 2>&1 "

:: PNG
cd %SRCDIR%\png-1.6.48
start %WAIT% makelib %OPTS% -copy libpng.lib %LIBDIR%\png.lib
start "" cmd /c "makelib %OPTS% -copy libpng.lib %LIBDIR%\png.lib > %LIBDIR%\png.out 2>&1 "

:: GD
cd %SRCDIR%\gd-2.3.3
start %WAIT% call makelib %OPTS% -copy libgd.lib %LIBDIR%\gd.lib
start "" cmd /c "makelib %OPTS% -copy libgd.lib %LIBDIR%\gd.lib > %LIBDIR%\gd.out 2>&1 "

:: GLUT
if x%arg3% == xfreeglut goto skip_glut
cd %SRCDIR%\glut-3.7.6
start %WAIT% makelib %OPTS% -copy libglutwin.lib %LIBDIR%\glut32.lib
start "" cmd /c "makelib %OPTS% -copy libglutwin.lib %LIBDIR%\glut32.lib > %LIBDIR%\glut32.out 2>&1 "
:skip_glut

:: GLUI
cd %SRCDIR%\glui_v2_1_beta
if x%arg3% == xfreeglut goto skip_glui1
start %WAIT% makelib %OPTS% -copy libglui.lib %LIBDIR%\glui.lib
start "" cmd /c "makelib %OPTS% -copy libglui.lib %LIBDIR%\glui.lib > %LIBDIR%\glui.out 2>&1 "
:skip_glui1

if NOT x%arg3% == xfreeglut goto skip_glui2
start %WAIT% makelib_freeglut %OPTS% -copy libglui.lib %LIBDIR%\glui.lib
start "" cmd /c "makelib_freeglut %OPTS% -copy libglui.lib %LIBDIR%\glui.lib > %LIBDIR%\glui.out 2>&1 "
:skip_glui2

:: pthreads
cd %SRCDIR%\pthreads
start %WAIT% makelib %OPTS% -copy libpthreads.lib %LIBDIR%\pthreads.lib
start "" cmd /c "makelib %OPTS% -copy libpthreads.lib %LIBDIR%\pthreads.lib > %LIBDIR%\pthread.out 2>&1 "

:: FREEGLUT
if NOT x%arg3% == xfreeglut goto skip_freeglut
Expand Down
24 changes: 12 additions & 12 deletions Build/LIBS/intel_win/make_LIBS.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,43 @@ set BUILDDIR=%CD%

:: ZLIB
cd %SRCDIR%\zlib131
start "building windows zlib" %WAIT% makelib %OPTS% -copy libz.lib %LIBDIR%\zlib.lib

start "building windows zlib" %WAIT% cmd /c "makelib %OPTS% -copy libz.lib %LIBDIR%\zlib.lib > %LIBDIR%\zlib.out 2>&1 "
:: JPEG
cd %SRCDIR%\jpeg-9b
start "building windows jpeg" %WAIT% makelib %OPTS% -copy libjpeg.lib %LIBDIR%\jpeg.lib
start "building windows jpeg" %WAIT% cmd /c "makelib %OPTS% -copy libjpeg.lib %LIBDIR%\jpeg.lib > %LIBDIR%\jpeg.out 2>&1 "

:: PNG
cd %SRCDIR%\png-1.6.48
start "building windows png" %WAIT% makelib %OPTS% -copy libpng.lib %LIBDIR%\png.lib
start "" cmd /c "makelib %OPTS% -copy libpng.lib %LIBDIR%\png.lib > %LIBDIR%\png.out 2>&1 "

:: GD
cd %SRCDIR%\gd-2.3.3
start "building windows gd" %WAIT% call makelib %OPTS% -copy libgd.lib %LIBDIR%\gd.lib
start "building windows gd" %WAIT% cmd /c "makelib %OPTS% -copy libgd.lib %LIBDIR%\gd.lib > %LIBDIR%\gd.out 2>&1 "

:: GLUT
if x%arg3% == xfreeglut goto skip_glut
cd %SRCDIR%\glut-3.7.6
start "building windows glut" %WAIT% makelib %OPTS% -copy libglutwin.lib %LIBDIR%\glut32.lib
cd %SRCDIR%\glut-3.7.6
start "building windows glut" %WAIT% cmd /c "makelib %OPTS% -copy libglutwin.lib %LIBDIR%\glut32.lib > %LIBDIR%\glut32.out 2>&1 "
:skip_glut

:: GLUI
cd %SRCDIR%\glui_v2_1_beta
if x%arg3% == xfreeglut goto skip_glui1
start "building windows glui" %WAIT% makelib %OPTS% -copy libglui.lib %LIBDIR%\glui.lib
start "building windows glui" %WAIT% cmd /c "makelib %OPTS% -copy libglui.lib %LIBDIR%\glui.lib > %LIBDIR%\glui.out 2>&1 "
:skip_glui1

if NOT x%arg3% == xfreeglut goto skip_glui2
start "building windows glui" %WAIT% makelib_freeglut %OPTS% -copy libglui.lib %LIBDIR%\glui.lib
start "building windows glui" %WAIT% cmd /c "makelib_freeglut %OPTS% -copy libglui.lib %LIBDIR%\glui.lib > %LIBDIR%\glui.out 2>&1 "
:skip_glui2

:: pthreads
cd %SRCDIR%\pthreads
start "building windows pthreads" %WAIT% makelib %OPTS% -copy libpthreads.lib %LIBDIR%\pthreads.lib
start "building windows pthreads" %WAIT% cmd /c "makelib %OPTS% -copy libpthreads.lib %LIBDIR%\pthreads.lib > %LIBDIR%\pthread.out 2>&1 "

:: FREEGLUT
if NOT "x%arg3%" == "xfreeglut" goto skip_freeglut
cd %BUILDDIR%\freeglut3.0.0\intel_win
if NOT x%arg3% == xfreeglut goto skip_freeglut
cd %BUILDDIR%\freeglut3.0.0\gnu_win
call make_freeglut %OPTS%
copy freeglut_staticd.lib %LIBDIR%\freeglut_staticd.lib
copy freeglut_staticd.lib %LIBDIR%\glut32.lib
Expand Down
5 changes: 4 additions & 1 deletion Source/gd-2.3.3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ target_compile_definitions(gd_static PUBLIC
-D_WIN32_IE=0x0600
)
if (WIN32)
target_compile_definitions(gd_static PUBLIC HAVE_BOOLEAN)
target_compile_definitions(gd_static PUBLIC )
endif()
target_include_directories(gd_static PUBLIC .)

Expand Down Expand Up @@ -114,5 +114,8 @@ if (CMAKE_C_COMPILER_ID STREQUAL Clang)
-Wno-implicit-function-declaration
-Wno-deprecated-declarations
-Wno-ignored-pragmas
-Wno-incompatible-function-pointer-types
-Wno-incompatible-pointer-types
-Wno-macro-redefined
)
endif()
61 changes: 10 additions & 51 deletions Source/gd-2.3.3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ AR=ar

CFLAGS=-DHAVE_LIBPNG -DHAVE_LIBZ -DHAVE_LIBJPEG -DHAVE_LIBX11

# CFLAGS invoked in the scripts that use this makefile

INCLUDEDIRS=-I. -I../png-1.6.48 -I../jpeg-9b -I../zlib131

#
#
# Changes should not be required below here.
#
#

# Update these with each release!

Expand All @@ -23,7 +23,9 @@ COMPILER=gcc -fPIC
SIZE=-m64
LIB=lib

CC=$(COMPILER) $(SIZE) $(INCLUDEDIRS) $(STDINT) -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types
CC=$(COMPILER) $(SIZE) $(INCLUDEDIRS) $(STDINT) \
-Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types \
-Wno-deprecated-declarations -Wno-macro-redefined

.SUFFIXES: .c .o .obj

Expand All @@ -32,57 +34,14 @@ CC=$(COMPILER) $(SIZE) $(INCLUDEDIRS) $(STDINT) -Wno-incompatible-function-point
.c.o:
$(CC) -c $(CFLAGS) $(INC) $(FILTERC) $<

LIBOBJS=gd.o \
gd_avif.o \
gd_bmp.o \
gd_color.o \
gd_color_map.o \
gd_color_match.o \
gd_crop.o \
gd_filename.o \
gd_filter.o \
gd_gd.o \
gd_gd2.o \
gd_gif_in.o \
gd_gif_out.o \
gd_heif.o \
gd_interpolation.o \
gd_io.o \
gd_io_dp.o \
gd_io_file.o \
gd_io_ss.o \
gd_matrix.o \
gd_nnquant.o \
gd_jpeg.o \
gd_png.o \
gd_rotate.o \
gd_security.o \
gd_ss.o \
gd_tga.o \
gd_tiff.o \
gd_topal.o \
gd_transform.o \
gd_version.o \
gd_wbmp.o \
gd_webp.o \
gd_xbm.o \
gdcache.o \
gdfontg.o \
gdfontl.o \
gdfontmb.o \
gdfonts.o \
gdfontt.o \
gdft.o \
gdfx.o \
gdhelpers.o \
gdkanji.o \
gdtables.o \
gdxpm.o \
wbmp.o
LIBOBJS=gd.o gd_avif.o gd_bmp.o gd_color.o gd_color_map.o gd_color_match.o gd_crop.o gd_filename.o \
gd_filter.o gd_gd.o gd_gd2.o gd_gif_in.o gd_gif_out.o gd_heif.o gd_interpolation.o gd_io.o gd_io_dp.o \
gd_io_file.o gd_io_ss.o gd_matrix.o gd_nnquant.o gd_jpeg.o gd_png.o gd_rotate.o gd_security.o gd_ss.o \
gd_tga.o gd_tiff.o gd_topal.o gd_transform.o gd_version.o gd_wbmp.o gd_webp.o gd_xbm.o gdcache.o gdfontg.o \
gdfontl.o gdfontmb.o gdfonts.o gdfontt.o gdft.o gdfx.o gdhelpers.o gdkanji.o gdtables.o gdxpm.o wbmp.o

LIBOBJSWIN = $(LIBOBJS:.o=.obj)

#Static library, if you really need one for some reason.
libgd.a: ${LIBOBJS}
$(AR) rc libgd.a ${LIBOBJS}
-ranlib libgd.a
Expand Down
6 changes: 4 additions & 2 deletions Source/gd-2.3.3/gd_jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@
#endif

/* 1.8.1: remove dependency on jinclude.h */
//#pragma pack(push, 8)
#ifdef _WIN32
#include "jpeglib_wrapper.h"
#else
#include "jpeglib.h"
//#pragma pack(pop)
#endif
#include "jerror.h"


Expand Down
13 changes: 13 additions & 0 deletions Source/gd-2.3.3/jpeglib_wrapper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef JPEGLIB_WRAPPER_H
#define JPEGLIB_WRAPPER_H

/* Rename 'boolean' for libjpeg to avoid conflicts */
#define boolean jpeg_boolean

/* Include the actual libjpeg header */
#include "jpeglib.h"

/* Restore the original 'boolean' so system headers still see it correctly */
#undef boolean

#endif /* JPEGLIB_WRAPPER_H */
3 changes: 1 addition & 2 deletions Source/gd-2.3.3/makelib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ erase *.o *.obj libgd.a libgd.lib
set target=libgd.lib
if %COMPILER% == gcc set target=libgd.a
if exist finished erase finished
@REM make CFLAGS="-DHAVE_BOOLEAN -DBGDWIN32 -DWIN32 -DNONDLL -DENABLE_FREETYPE=OFF -DBUILD_SHARED_LIBS=OFF -DHAVE_LIBPNG -DHAVE_LIBZ -DHAVE_LIBJPEG " COMPILER=%COMPILER% LIB=%LIB% SIZE=%SIZE% RM=erase -f ./makefile %target%
make CFLAGS="-DHAVE_BOOLEAN -DBGDWIN32 -DWIN32 -DENABLE_FREETYPE=OFF -DHAVE_LIBPNG -DHAVE_LIBZ -DHAVE_LIBJPEG " COMPILER=%COMPILER% LIB=%LIB% SIZE=%SIZE% RM=erase -f ./makefile %target%
make CFLAGS="-DBGDWIN32 -DWIN32 -DENABLE_FREETYPE=OFF -DHAVE_LIBPNG -DHAVE_LIBZ -DHAVE_LIBJPEG " COMPILER=%COMPILER% LIB=%LIB% SIZE=%SIZE% RM=erase -f ./makefile %target%
if %COPYLIB% == 1 copy %FROMLIB% %TOLIB%
echo finished > finished
if "x%EXIT_SCRIPT%" == "x" goto skip1
Expand Down
4 changes: 3 additions & 1 deletion Source/glui_v2_1_beta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ else
NOCLOSE=-D pp_NOCLOSE
endif

CFLAGS=-D_CRT_SECURE_NO_WARNINGS -Wno-deprecated-declarations -Wdeprecated-declarations

.c.obj:
$(CC) $(CFLAGS) $(INCS) $(FILTERC) -c $<
.c.o:
Expand Down Expand Up @@ -50,7 +52,7 @@ gnu_osx: CFLAGS=-m64 $(NOCLOSE) -fpermissive
gnu_osx: $(GLUI_OBJS)
ar rcs libglui.a $(GLUI_OBJS)

intel_win: CFLAGS= $(NOCLOSE) /Wno-unused_parameter
intel_win: CFLAGS+= $(NOCLOSE)
intel_win : $(GLUI_OBJSWIN)
$(LIB) $(GLUI_OBJSWIN) -OUT:libglui.lib

Expand Down
2 changes: 1 addition & 1 deletion Source/jpeg-9b/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SIZE=-m32
CC=$(COMPILER) $(SIZE)

# You may need to adjust these cc options:
CFLAGS= -O2 -I$(srcdir)
CFLAGS= -O2 -I$(srcdir) -Wno-deprecated-declarations

.c.obj:
$(CC) -c $(CFLAGS) $(INC) $(FILTERC) $<
Expand Down
14 changes: 4 additions & 10 deletions Source/png-1.6.48/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ LIB=lib
# Compiler and linker flags
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
STDC = -pedantic-errors # -std=c99
WARN = -Wall -Wextra -Wundef
WARN = -Wall -Wextra -Wundef -Wno-sign-conversion -Wno-deprecated-declarations
WARNMORE = -Wcast-align -Wconversion -Wshadow -Wpointer-arith -Wwrite-strings \
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
LOCAL_CPPFLAGS = $(NOHWOPT)
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
LOCAL_CFLAGS = $(STDC) $(WARN) # $(WARNMORE)
CFLAGS = -O2 # -g
ALL_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
CFLAGS = -O2 -I$(ZLIBINC) $(NOHWOPT) $(WARN) $(WARNMORE)
ARFLAGS = rc
LDFLAGS = -L$(ZLIBLIB) # -g
LIBS = -lz -lm
Expand All @@ -60,10 +54,10 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
.SUFFIXES: .c .o .obj

.c.obj:
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c
$(CC) -c $(CFLAGS) -o $@ $*.c

.c.o:
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c
$(CC) -c $(CFLAGS) -o $@ $*.c

static: libpng.a pngtest$(EXEEXT)

Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#ifdef _WIN32
#define pp_DIALOG_SHORTCUTS // dialog shortcuts
//#define pp_JPEG // isolate jpeg code (rendering to jpeg does not work on windows)
#define pp_JPEG // isolate jpeg code (rendering to jpeg does not work on windows)
#endif

//*** options: Linux
Expand Down