Created
June 7, 2022 12:48
-
-
Save mdondrup/95f09f405b2fe2d2c6ed241a661f9075 to your computer and use it in GitHub Desktop.
diff2compileMac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/code/Makefile.complete b/code/Makefile.complete | |
index 39787e9..3f451fc 100644 | |
--- a/code/Makefile.complete | |
+++ b/code/Makefile.complete | |
@@ -24,12 +24,12 @@ SHELL = /bin/sh | |
# Global external software directory. | |
# If not set in your .cshrc, then set it here. <--- | |
-#FREEWAREDIR = /usr/local | |
+FREEWAREDIR = /opt/local/lib | |
# OpenGL and GLUT for X (UNIX). | |
# Must be modified for Windows 95/NT. <--- | |
-GLUTDIR = $(FREEWAREDIR)/glut | |
-GLUTLINK = $(GLUTDIR)/lib/glut/libglut.a -lGLU -lGL -lXmu -lXext -lX11 | |
+GLUTDIR = $(FREEWAREDIR) | |
+GLUTLINK = $(GLUTDIR)/libglut.dylib -L$(GLUTDIR) -lGLU -lGL -lGLUT -lXmu -lXext -lX11 | |
OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include | |
OPENGLOBJ = opengl.o | |
OPENGLCLIBOBJ = ogl_utils.o ogl_body.o ogl_bitmap_character.o | |
@@ -40,39 +40,39 @@ IMAGEOBJ = image.o eps_img.o sgi_img.o | |
# JPEG image file format; requires the JPEG library. | |
# Comment out these lines if the JPEG library is not available. <--- | |
-JPEGDIR = $(FREEWAREDIR)/jpeg | |
-JPEGLINK = $(JPEGDIR)/libjpeg.a | |
+JPEGDIR = $(FREEWAREDIR) | |
+JPEGLINK = $(JPEGDIR)/libjpeg.dylib -ljpeg | |
JPEGFLAG = -DJPEG_SUPPORT -I$(JPEGDIR) | |
JPEGOBJ = jpeg_img.o | |
# PNG image file format; requires the PNG library and the zlib library. | |
# Comment out these lines if the PNG and zlib libraries are not available. <--- | |
-ZLIBDIR = $(FREEWAREDIR)/zlib | |
-ZLIBLINK = $(ZLIBDIR)/libz.a | |
-PNGDIR = $(FREEWAREDIR)/libpng | |
-PNGLINK = $(PNGDIR)/libpng.a | |
+ZLIBDIR = $(FREEWAREDIR) | |
+ZLIBLINK = $(ZLIBDIR)/libz.dylib | |
+PNGDIR = $(FREEWAREDIR) | |
+PNGLINK = $(PNGDIR)/libpng.dylib | |
PNGFLAG = -DPNG_SUPPORT -I$(PNGDIR) -I$(ZLIBDIR) | |
PNGOBJ = png_img.o | |
# GIF image file format; requires the gd 1.3 library. | |
# Comment out these lines if the gd 1.3 library is not available. <--- | |
-GIFDIR = $(FREEWAREDIR)/gd | |
-GIFLINK = $(GIFDIR)/libgd.a | |
-GIFFLAG = -DGIF_SUPPORT -I$(GIFDIR) | |
-GIFOBJ = gif_img.o | |
+#GIFDIR = $(FREEWAREDIR) | |
+#GIFLINK = /Users/mdondrup/opt/miniconda3/lib/libgd.dylib -lgd | |
+#GIFFLAG = -DGIF_SUPPORT -I$(GIFDIR) | |
+#GIFOBJ = gif_img.o | |
# SGI IRIX's C compiler. | |
-CC = cc -32 | |
+CC = gcc | |
# Optimization flags: | |
-COPT = -O1 | |
+COPT = | |
# Correctness flags: | |
#CCHECK = -ansi -fullwarn -g -DSELECT_DEBUG | |
-CCHECK = -ansi -fullwarn | |
+CCHECK = -Wall | |
#CCHECK = -ansi -fullwarn -DNDEBUG | |
# General cc compile flags. | |
CFLAGS = $(COPT) $(CCHECK) -Iclib $(OPENGLFLAG) $(IMAGEFLAG) $(JPEGFLAG) \ | |
- $(PNGFLAG) $(GIFFLAG) | |
+ $(PNGFLAG) $(GIFFLAG) -I$HOME/miniconda2/include -I/opt/X11/include -I/opt/local/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/ | |
# GNU's bison; required instead of the ordinary yacc. | |
YACC = bison | |
diff --git a/code/clib/ogl_bitmap_character.c b/code/clib/ogl_bitmap_character.c | |
index 1e68911..22a3874 100644 | |
--- a/code/clib/ogl_bitmap_character.c | |
+++ b/code/clib/ogl_bitmap_character.c | |
@@ -17,13 +17,13 @@ | |
#include "ogl_bitmap_character.h" | |
-/* public ==================== | |
+ | |
#include <GL/glut.h> | |
-==================== public */ | |
+ | |
#include <assert.h> | |
-#include <../lib/glut/glutbitmap.h> | |
+#include <glutbitmap.h> | |
/*------------------------------------------------------------*/ | |
diff --git a/code/clib/ogl_bitmap_character.h b/code/clib/ogl_bitmap_character.h | |
index cc9190e..267ed24 100644 | |
--- a/code/clib/ogl_bitmap_character.h | |
+++ b/code/clib/ogl_bitmap_character.h | |
@@ -1,7 +1,7 @@ | |
#ifndef OGL_BITMAP_CHARACTER_H | |
#define OGL_BITMAP_CHARACTER_H 1 | |
-#include <GL/glut.h> | |
+#include <GLUT/glut.h> | |
void | |
ogl_bitmap_character (void *font, int c); | |
diff --git a/code/opengl.c b/code/opengl.c | |
index 1192f59..8a06aac 100644 | |
--- a/code/opengl.c | |
+++ b/code/opengl.c | |
@@ -18,7 +18,7 @@ | |
#include <assert.h> | |
#include <stdlib.h> | |
-#include <GL/glut.h> | |
+#include <GLUT/glut.h> | |
#include "clib/str_utils.h" | |
#include "clib/dynstring.h" | |
diff --git a/code/png_img.c b/code/png_img.c | |
index 0a766bb..9574a1d 100644 | |
--- a/code/png_img.c | |
+++ b/code/png_img.c | |
@@ -15,7 +15,7 @@ | |
#include <assert.h> | |
#include <stdlib.h> | |
- | |
+#include <zlib.h> | |
#include <GL/gl.h> | |
#include <png.h> | |
@@ -69,7 +69,7 @@ pngi_first_plot (void) | |
info_ptr = png_create_info_struct (png_ptr); | |
if (info_ptr == NULL) | |
yyerror ("png_img: could not create PNG info structure"); | |
- if (setjmp (png_ptr->jmpbuf)) yyerror ("png_img: could not setjmp"); | |
+ //if (setjmp (png_ptr->jmpbuf)) yyerror ("png_img: could not setjmp"); | |
png_init_io (png_ptr, outfile); | |
png_set_compression_level (png_ptr, compression_level); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment