2016-04-11 02:34:59 +03:00
|
|
|
# Flags
|
2017-12-31 19:12:41 +03:00
|
|
|
CFLAGS += -std=c99 -pedantic -O2
|
2016-10-22 22:43:33 +03:00
|
|
|
LIBS :=
|
2016-04-11 02:34:59 +03:00
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
BIN := $(BIN).exe
|
2016-10-22 22:43:33 +03:00
|
|
|
LIBS := -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32
|
2016-04-11 02:34:59 +03:00
|
|
|
else
|
2016-04-19 14:49:07 +03:00
|
|
|
UNAME_S := $(shell uname -s)
|
2017-08-17 07:28:03 +03:00
|
|
|
GLFW3 := $(shell pkg-config --libs glfw3)
|
2016-04-19 14:49:07 +03:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2017-08-17 07:28:03 +03:00
|
|
|
LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
|
2016-05-20 20:50:35 +03:00
|
|
|
CFLAGS += -I/usr/local/include
|
2016-04-19 14:49:07 +03:00
|
|
|
else
|
2017-08-17 07:28:03 +03:00
|
|
|
LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW
|
2016-04-19 14:49:07 +03:00
|
|
|
endif
|
2016-04-11 02:34:59 +03:00
|
|
|
endif
|
|
|
|
|
2016-10-22 22:43:33 +03:00
|
|
|
all: generate file_browser extended canvas skinning
|
2016-08-23 18:34:13 +03:00
|
|
|
|
2016-10-22 22:43:33 +03:00
|
|
|
generate: clean
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
@mkdir bin 2> nul || exit 0
|
|
|
|
else
|
|
|
|
@mkdir -p bin
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -rf bin
|
|
|
|
|
|
|
|
file_browser: generate
|
2016-04-11 02:34:59 +03:00
|
|
|
$(CC) $(CFLAGS) -o bin/file_browser file_browser.c $(LIBS)
|
|
|
|
|
2016-10-22 22:43:33 +03:00
|
|
|
extended: generate
|
2016-04-11 02:34:59 +03:00
|
|
|
$(CC) $(CFLAGS) -o bin/extended extended.c $(LIBS)
|
|
|
|
|
2016-10-22 22:43:33 +03:00
|
|
|
canvas: generate
|
2016-08-23 18:34:13 +03:00
|
|
|
$(CC) $(CFLAGS) -o bin/canvas canvas.c $(LIBS)
|
|
|
|
|
2016-10-22 22:43:33 +03:00
|
|
|
skinning: generate
|
2016-08-23 18:34:13 +03:00
|
|
|
$(CC) $(CFLAGS) -o bin/skinning skinning.c $(LIBS)
|
|
|
|
|