Skip to content

Commit

Permalink
Merge pull request #59 from capnramses/macOS-makefile-tweaks
Browse files Browse the repository at this point in the history
Mac os makefile tweaks
  • Loading branch information
capnramses authored Aug 20, 2024
2 parents 0706304 + 89e2493 commit 81f0b37
Show file tree
Hide file tree
Showing 42 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions 00_hello_triangle/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = hellot
CC = clang
FLAGS = -std=c99 -DAPPLE -Wall -pedantic -Wextra
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.c

Expand Down
6 changes: 3 additions & 3 deletions 00_hello_triangle_gl2.1/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = hellot
CC = clang
FLAGS = -std=c99 -DAPPLE -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
FLAGS = -std=c99 -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.c

Expand Down
6 changes: 3 additions & 3 deletions 01_extended_init/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = extinit
CC = clang
FLAGS = -std=c99 -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.c

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

8 changes: 4 additions & 4 deletions 02_shaders/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = shaders
CC = clang
FLAGS = -std=c99 -DAPPLE -Wall -pedantic -mmacosx-version-min=10.5 -arch x86_64 -fmessage-length=0 -UGLFW_CDECL -fprofile-arcs -ftest-coverage
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
FLAGS = -std=c99 -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.c gl_utils.c

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 03_vertex_buffer_objects/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
BIN = vbuffs
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}
6 changes: 3 additions & 3 deletions 04_mats_and_vecs/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = matsvecs
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 05_virtual_camera/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = vcam
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp maths_funcs.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

2 changes: 1 addition & 1 deletion 05_virtual_camera/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int main() {
if ( GL_TRUE != params ) {
fprintf( stderr, "ERROR: could not link shader programme GL index %i\n", shader_programme );
print_programme_info_log( shader_programme );
return false;
return 1;
}

/*--------------------------create camera matrices----------------------------*/
Expand Down
6 changes: 3 additions & 3 deletions 06_vcam_with_quaternion/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = quats
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 07_ray_picking/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = raypick
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp maths_funcs.cpp obj_parser.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 08_phong/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = phong
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 09_texture_mapping/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = texmap
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 10_screen_capture/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = scrcap
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 11_video_capture/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = vidcap
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 12_debugging_shaders/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = debugshdrs
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

4 changes: 2 additions & 2 deletions 13_mesh_import/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = meshimp
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic -std=c++11
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw -lassimp
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw -lassimp
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

Expand Down
6 changes: 3 additions & 3 deletions 14_multi_tex/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = multitex
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

4 changes: 2 additions & 2 deletions 15_phongtextures/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = phongtex
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic -std=c++11
FLAGS = -DAPPLE -Wall -pedantic -std=c++11 -I/opt/homebrew/include
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw -lassimp
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw -lassimp
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

Expand Down
6 changes: 3 additions & 3 deletions 16_frag_reject/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = fragrej
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 17_alpha_blending/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = alphablend
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

6 changes: 3 additions & 3 deletions 18_spotlights/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BIN = spotlights
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

all:
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${LIBS}
${CC} ${FLAGS} ${FRAMEWORKS} -o ${BIN} ${SRC} ${INC} ${LIBS}

4 changes: 2 additions & 2 deletions 19_fog/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = fog
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic -std=c++11
FLAGS = -DAPPLE -Wall -pedantic -std=c++11 -I/opt/homebrew/include
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw -lassimp
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw -lassimp
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

Expand Down
4 changes: 2 additions & 2 deletions 20_normal_mapping/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = nmap
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw -lassimp -std=c++11
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw -lassimp -std=c++11
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp

Expand Down
4 changes: 2 additions & 2 deletions 21_cube_mapping/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = cubemap
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic -std=c++11
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw -lassimp
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw -lassimp
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp gl_utils.cpp obj_parser.cpp

Expand Down
4 changes: 2 additions & 2 deletions 22_geom_shaders/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = geomsh
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp

Expand Down
4 changes: 2 additions & 2 deletions 23_tessellation_shaders/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = tess
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp gl_utils.cpp

Expand Down
4 changes: 2 additions & 2 deletions 24_gui_panels/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = overlays
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp

Expand Down
4 changes: 2 additions & 2 deletions 25_sprite_sheets/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = sprites
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp

Expand Down
4 changes: 2 additions & 2 deletions 26_bitmap_fonts/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN = fonts
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/opt/homebrew/include
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp

Expand Down
6 changes: 3 additions & 3 deletions 27_font_atlas/Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
CC = clang++
FLAGS = -DAPPLE -Wall -pedantic
INC = -I/sw/include -I/usr/local/include -I/usr/local/include/freetype2/
LIBS = -lGLEW -lglfw
INC = -I/sw/include -I/usr/local/include -I/usr/local/include/freetype2/ -I/opt/homebrew/include -I/opt/homebrew/include/freetype2/
LIBS = -L /opt/homebrew/lib -lGLEW -lglfw
FRAMEWORKS = -framework Cocoa -framework OpenGL -framework IOKit
SRC = main.cpp maths_funcs.cpp

all: generator viewer

generator:
${CC} ${FLAGS} -o generate generator_main.cpp ${INC} -lfreetype
${CC} ${FLAGS} -o generate generator_main.cpp ${INC} -L /opt/homebrew/lib -lfreetype

viewer:
${CC} ${FLAGS} ${FRAMEWORKS} -o view viewer_main.cpp maths_funcs.cpp ${INC} ${LIBS}
Loading

0 comments on commit 81f0b37

Please sign in to comment.