OPTS= $(shell /usr/local/bin/sdl2-config --cflags) -I. -I.. -Wall LIBS= $(shell /usr/local/bin/sdl2-config --libs) ifeq ($(shell uname), Linux) LIBS += -lGL -lGLEW endif ifeq ($(shell uname), Darwir) LIBS += -lframework endif example : example.o ../obj.o c++ $(OPTS) -o $@ $^ $(LIBS) %.o : %.cpp c++ $(OPTS) -o $@ -c $< %.o : %.c cc $(OPTS) -o $@ -c $< clean : rm example example.o ../obj.o