nuclear@5: src = $(wildcard src/*.c) nuclear@5: obj = $(src:.c=.o) nuclear@5: bin = test nuclear@5: nuclear@28: vrlib_root = $(shell pwd)/.. nuclear@7: vrlib = $(vrlib_root)/libgoatvr.so nuclear@5: nuclear@9: warn = -Wall nuclear@9: nuclear@9: CFLAGS = -pedantic $(warn) -g `pkg-config --cflags sdl2` -I$(vrlib_root)/src nuclear@28: LDFLAGS = $(libgl) -L$(vrlib_root) -Wl,-rpath=$(vrlib_root) -lgoatvr `pkg-config --libs sdl2` nuclear@5: nuclear@5: ifeq ($(shell uname -s), Darwin) nuclear@5: libgl = -framework OpenGL -lGLEW nuclear@9: warn += -Wno-deprecated-declarations nuclear@5: else nuclear@5: libgl = -lGL -lGLU -lGLEW nuclear@5: endif nuclear@5: nuclear@5: $(bin): $(obj) $(vrlib) nuclear@5: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@5: nuclear@5: .PHONY: $(vrlib) nuclear@5: $(vrlib): nuclear@5: $(MAKE) -C $(vrlib_root) nuclear@5: nuclear@5: .PHONY: clean nuclear@5: clean: nuclear@5: rm -f $(obj) $(bin)