19 lines
748 B
Plaintext
19 lines
748 B
Plaintext
alias b := build
|
|
alias r := run
|
|
|
|
build: transpile_shaders_metal
|
|
mkdir -p bin
|
|
cc -Ivendor/ -O0 -g -Wall -Wextra -framework Cocoa -framework QuartzCore -framework CoreImage -framework Metal -framework MetalKit -ObjC src/*.c -o bin/an_editor
|
|
# cc -Ivendor/ -g -Wall -Wextra src/*.c -o bin/an_editor -lEGL -lGLESv2 -lGL -lm -lX11 -lXi -lXcursor
|
|
# cc bin/*.o -o bin/an_editor -lEGL -lGLESv2 -lGL -lm -lX11 -lXi -lXcursor
|
|
|
|
run: build
|
|
# nixGLIntel ./bin/an_editor
|
|
./bin/an_editor
|
|
|
|
transpile_shaders_metal:
|
|
mkdir -p bin/transpiled_shaders
|
|
|
|
xcrun -sdk macosx metal -o bin/transpiled_shaders/text_atlas.ir -c shaders/text_atlas.metal
|
|
xcrun -sdk macosx metallib -o bin/shaders.metallib bin/transpiled_shaders/text_atlas.ir
|