diff options
author | Mattias Andrée <maandree@kth.se> | 2021-08-13 18:06:45 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-08-13 18:06:45 +0200 |
commit | fcffe4810f59de6a4f39596a37242022b68e7bc5 (patch) | |
tree | d91ef754fe3b24ecfea8270ef4ef0c070de8c359 /Makefile | |
download | libparsesfnt-fcffe4810f59de6a4f39596a37242022b68e7bc5.tar.gz libparsesfnt-fcffe4810f59de6a4f39596a37242022b68e7bc5.tar.bz2 libparsesfnt-fcffe4810f59de6a4f39596a37242022b68e7bc5.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..11982d0 --- /dev/null +++ b/Makefile @@ -0,0 +1,79 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +MODULES =\ + head\ + bhed\ + hhea\ + hmtx\ + vhea\ + vmtx\ + maxp\ + loca\ + name\ + fmtx\ + ltag\ + xref\ + trak\ + gcid\ + fpgm\ + fdsc\ + gasp\ + avar\ + meta + +OBJ =\ + libparsesfnt_parse___.o\ + libparsesfnt_parse_fontdir.o\ + libparsesfnt_parse_tabdir.o\ + $(MODULES:=.o) + +HDR =\ + libparsesfnt.h\ + common.h + +AR_OBJ = $(OBJ) +# Using "AR_OBJ=libparsesfnt-all.o" can reduce the size of the +# library, however this may affect the size of applications that +# don't use most of the functions. If you are compiling for your +# application specification you can combine this with setting +# MODULES to the parts your application will use; note however +# that 'fpgm' covers both 'fpgm' and 'prep'. + +all: libparsesfnt.a +$(OBJ): $(@:.o=.c) $(HDR) +libparsesfnt-all.o: libparsesfnt-all.c $(HDR) + +libparsesfnt-all.c: $(OBJ:.o=.c) + cat $(OBJ:.o=.c) > $@ + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +.c.lo: + $(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +libparsesfnt.a: $(AR_OBJ) + @rm -f -- $@ + $(AR) rc $@ $(AR_OBJ) + +install: libparsesfnt.a + mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" + mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + cp -- libparsesfnt.a "$(DESTDIR)$(PREFIX)/lib/" + cp -- libparsesfnt.h "$(DESTDIR)$(PREFIX)/include/" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libparsesfnt.a" + -rm -f -- "$(DESTDIR)$(PREFIX)/include/libparsesfnt.h" + +clean: + -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda + -rm -f -- libparsesfnt-all.c + +.SUFFIXES: +.SUFFIXES: .lo .o .c + +.PHONY: all install uninstall clean |