nuclear@2: # change PREFIX to install elsewhere (default: /usr/local) nuclear@2: PREFIX = /usr/local nuclear@2: nuclear@1: src = $(wildcard src/*.c) nuclear@1: obj = $(src:.c=.o) nuclear@1: bin = imgthumbs nuclear@1: nuclear@1: CFLAGS = -pedantic -Wall -g -I../../src nuclear@1: LDFLAGS = $(libgl) -limago nuclear@1: nuclear@1: ifeq ($(shell uname -s), Darwin) nuclear@2: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@1: else nuclear@2: libgl = -lGL -lGLU -lglut -lGLEW nuclear@1: endif nuclear@1: nuclear@1: $(bin): $(obj) nuclear@1: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin) nuclear@2: nuclear@2: .PHONY: install nuclear@2: install: nuclear@2: mkdir -p $(DESTDIR)$(PREFIX)/bin nuclear@2: cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) nuclear@2: nuclear@2: .PHONY: uninstall nuclear@2: uninstall: nuclear@2: rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)