forked from mgerdes/Open-Golf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.macos
25 lines (19 loc) · 1.2 KB
/
Makefile.macos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
BIN := minigolf
SOURCES := src/assets.c src/audio.c src/config.c src/data_stream.c src/file.c src/game.c src/game_editor.c src/hole.c src/hotloader.c src/lightmaps.c src/log.c src/maths.c src/main.c src/obj_converter.c src/profiler.c src/renderer.c src/single_file_libs.c src/ui.c libraries/array.c libraries/glad.c libraries/map.c libraries/miniz.c libraries/s7.c
OBJS := $(SOURCES:.c=.o)
DEPS = $(SOURCES:%.c=%.d)
CPP_SOURCES := libraries/cimgui.cpp libraries/xatlas.cpp libraries/imgui/imgui.cpp libraries/imgui/imgui_draw.cpp libraries/imgui/imgui_widgets.cpp libraries/imgui/imgui_demo.cpp
CPP_OBJS := $(CPP_SOURCES:.cpp=.o)
CPP_DEPS = $(CPP_SOURCES:%.cpp=%.d)
CFLAGS := -Isrc -Wall -Ilibraries -g -Wno-unused-function -Wno-unused-variable -DSOKOL_GLCORE33 -DHOLE_EDITOR -DHOTLOADER_ACTIVE
all: $(BIN)
$(BIN): $(OBJS) $(CPP_OBJS)
clang -o $@ $(OBJS) $(CPP_OBJS) -lm -lpthread -framework Cocoa -framework CoreServices -framework OpenGL -framework AudioToolbox -lstdc++
$(OBJS): %.o: %.c
clang -x objective-c $(CFLAGS) -c -MMD -o $@ $< -fobjc-arc
$(CPP_OBJS): %.o: %.cpp
clang $(CFLAGS) -c -MMD -o $@ $< -std=c++11
-include $(DEPS)
-include $(CPP_DEPS)
clean:
rm -f $(BIN) $(OBJS) $(CPP_OBJS) $(DEPS) $(CPP_DEPS)