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@11: LDFLAGS = $(libgl) -limago $(resman) -lpthread 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@11: resman = ../../libresman.a nuclear@11: nuclear@11: $(bin): $(obj) resman nuclear@1: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@11: .PHONY: resman nuclear@11: resman: nuclear@11: $(MAKE) -C ../.. nuclear@11: 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)