nuclear@5: src = $(wildcard src/*.c) nuclear@5: obj = $(src:.c=.o) nuclear@5: bin = test nuclear@5: nuclear@5: vrlib_root = .. nuclear@7: vrlib = $(vrlib_root)/libgoatvr.so nuclear@5: nuclear@5: CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2` -I$(vrlib_root)/src nuclear@7: LDFLAGS = $(libgl) `pkg-config --libs sdl2` -L$(vrlib_root) -lgoatvr -Wl,-rpath=$(vrlib_root) nuclear@5: nuclear@5: ifeq ($(shell uname -s), Darwin) nuclear@5: libgl = -framework OpenGL -lGLEW 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)