nuclear@50: PREFIX = /usr/local nuclear@50: nuclear@21: src = $(wildcard src/*.c) nuclear@21: obj = $(src:.c=.o) nuclear@21: bin = font2glyphmap nuclear@21: nuclear@21: CC = gcc nuclear@21: CFLAGS = -pedantic -Wall -g -I../../src -I/usr/local/include nuclear@21: LDFLAGS = -L. -L/usr/local/lib -ldrawtext nuclear@21: nuclear@21: ifeq ($(shell uname -s), Darwin) nuclear@21: lib_so = libdrawtext.dylib nuclear@21: else nuclear@29: lib_so = libdrawtext.so.0.2 nuclear@21: endif nuclear@21: nuclear@21: $(bin): $(obj) $(lib_so) $(font) nuclear@21: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@21: nuclear@21: $(lib_so): ../../$(lib_so) nuclear@21: rm -f $@ nuclear@21: ln -s $< $@ nuclear@21: nuclear@21: .PHONY: clean nuclear@21: clean: nuclear@21: rm -f $(obj) $(bin) $(lib_so) nuclear@50: nuclear@50: .PHONY: install nuclear@50: install: nuclear@50: mkdir -p $(DESTDIR)$(PREFIX)/bin nuclear@50: cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) nuclear@50: nuclear@50: .PHONY: uninstall nuclear@50: uninstall: nuclear@50: rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)