libdrawtext
annotate Makefile.in @ 71:aca73aa1944f
added freetype.lib dependency in vc project file
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 10 Mar 2013 19:02:43 +0200 |
parents | 805936da8d6b |
children | df6d52b36bd6 |
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@10 | 19 linkname = $(name).so |
nuclear@0 | 20 sharedopt = -shared -Wl,-soname,$(soname) |
nuclear@0 | 21 |
nuclear@0 | 22 libgl = -lGL -lGLU -lGLEW |
nuclear@0 | 23 endif |
nuclear@0 | 24 |
nuclear@0 | 25 CC = gcc |
nuclear@11 | 26 CFLAGS = -pedantic -Wall -g -fPIC -I$(PREFIX)/include $(ft2_cflags) |
nuclear@11 | 27 LDFLAGS = -L$(PREFIX)/lib $(ft2_libs) $(libgl) |
nuclear@0 | 28 |
nuclear@0 | 29 .PHONY: all |
nuclear@0 | 30 all: $(lib_a) $(lib_so) |
nuclear@0 | 31 |
nuclear@0 | 32 $(lib_a): $(obj) |
nuclear@0 | 33 $(AR) rcs $@ $(obj) |
nuclear@0 | 34 |
nuclear@0 | 35 $(lib_so): $(obj) |
nuclear@0 | 36 $(CC) $(sharedopt) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 37 |
nuclear@0 | 38 -include $(dep) |
nuclear@0 | 39 |
nuclear@0 | 40 %.d: %.c |
nuclear@0 | 41 @$(CPP) $(CFLAGS) -MM $< >$@ |
nuclear@0 | 42 |
nuclear@0 | 43 |
nuclear@0 | 44 .PHONY: clean |
nuclear@0 | 45 clean: |
nuclear@0 | 46 rm -f $(obj) $(lib_a) $(lib_so) |
nuclear@0 | 47 |
nuclear@0 | 48 .PHONY: cleandep |
nuclear@0 | 49 cleandep: |
nuclear@0 | 50 rm -f $(dep) |
nuclear@0 | 51 |
nuclear@0 | 52 .PHONY: install |
nuclear@0 | 53 install: $(lib_a) $(lib_so) |
nuclear@0 | 54 mkdir -p $(PREFIX)/lib $(PREFIX)/include |
nuclear@0 | 55 cp $(lib_a) $(PREFIX)/lib/$(lib_a) |
nuclear@0 | 56 cp $(lib_so) $(PREFIX)/lib/$(lib_so) |
nuclear@0 | 57 cp src/drawtext.h $(PREFIX)/include/drawtext.h |
nuclear@12 | 58 [ -n "$(linkname)" ] && \ |
nuclear@12 | 59 rm -f $(PREFIX)/lib/$(linkname) $(PREFIX)/lib/$(soname) && \ |
nuclear@12 | 60 cd $(PREFIX)/lib && ln -s $(lib_so) $(linkname) && ln -s $(lib_so) $(soname) || true |
nuclear@0 | 61 |
nuclear@0 | 62 |
nuclear@0 | 63 .PHONY: uninstall |
nuclear@0 | 64 uninstall: |
nuclear@0 | 65 rm -f $(PREFIX)/lib/$(lib_a) |
nuclear@0 | 66 rm -f $(PREFIX)/lib/$(lib_so) |
nuclear@11 | 67 rm -f $(PREFIX)/lib/$(linkname) |
nuclear@11 | 68 rm -f $(PREFIX)/lib/$(soname) |
nuclear@0 | 69 rm -f $(PREFIX)/include/drawtext.h |