libdrawtext

annotate Makefile.in @ 59:e0957fc47162

added dtx_char_at_pt (not tested)
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sun, 18 Sep 2011 01:30:30 +0300
parents
children 5de80fdb40db
rev   line source
nuclear@0 1 src = $(wildcard src/*.c)
nuclear@0 2 obj = $(src:.c=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@0 4
nuclear@0 5 abi = 0
nuclear@0 6 rev = 0
nuclear@0 7
nuclear@0 8 name = libdrawtext
nuclear@0 9 lib_a = $(name).a
nuclear@0 10
nuclear@0 11 ifeq ($(shell uname -s), Darwin)
nuclear@0 12 lib_so = $(name).dylib
nuclear@0 13 sharedopt = -dynamiclib
nuclear@0 14
nuclear@0 15 libgl = -framework OpenGL -lGLEW
nuclear@0 16 else
nuclear@0 17 soname = $(name).so.$(abi)
nuclear@0 18 lib_so = $(soname).$(rev)
nuclear@0 19 sharedopt = -shared -Wl,-soname,$(soname)
nuclear@0 20
nuclear@0 21 libgl = -lGL -lGLU -lGLEW
nuclear@0 22 endif
nuclear@0 23
nuclear@0 24 CC = gcc
nuclear@0 25 CFLAGS = -pedantic -Wall -g -fPIC $(ft2_cflags)
nuclear@0 26 LDFLAGS = $(ft2_libs) $(libgl)
nuclear@0 27
nuclear@0 28 .PHONY: all
nuclear@0 29 all: $(lib_a) $(lib_so)
nuclear@0 30
nuclear@0 31 $(lib_a): $(obj)
nuclear@0 32 $(AR) rcs $@ $(obj)
nuclear@0 33
nuclear@0 34 $(lib_so): $(obj)
nuclear@0 35 $(CC) $(sharedopt) -o $@ $(obj) $(LDFLAGS)
nuclear@0 36
nuclear@0 37 -include $(dep)
nuclear@0 38
nuclear@0 39 %.d: %.c
nuclear@0 40 @$(CPP) $(CFLAGS) -MM $< >$@
nuclear@0 41
nuclear@0 42
nuclear@0 43 .PHONY: clean
nuclear@0 44 clean:
nuclear@0 45 rm -f $(obj) $(lib_a) $(lib_so)
nuclear@0 46
nuclear@0 47 .PHONY: cleandep
nuclear@0 48 cleandep:
nuclear@0 49 rm -f $(dep)
nuclear@0 50
nuclear@0 51 .PHONY: install
nuclear@0 52 install: $(lib_a) $(lib_so)
nuclear@0 53 mkdir -p $(PREFIX)/lib $(PREFIX)/include
nuclear@0 54 cp $(lib_a) $(PREFIX)/lib/$(lib_a)
nuclear@0 55 cp $(lib_so) $(PREFIX)/lib/$(lib_so)
nuclear@0 56 cp src/drawtext.h $(PREFIX)/include/drawtext.h
nuclear@0 57 rm -f $(PREFIX)/lib/$(name).so
nuclear@0 58 cd $(PREFIX)/lib && ln -s $(lib_so) $(name).so
nuclear@0 59
nuclear@0 60
nuclear@0 61 .PHONY: uninstall
nuclear@0 62 uninstall:
nuclear@0 63 rm -f $(PREFIX)/lib/$(lib_a)
nuclear@0 64 rm -f $(PREFIX)/lib/$(lib_so)
nuclear@0 65 rm -f $(PREFIX)/lib/$(name).so
nuclear@0 66 rm -f $(PREFIX)/include/drawtext.h