diff options
author | Mattias Andrée <maandree@kth.se> | 2020-04-26 11:02:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-04-26 11:08:13 +0200 |
commit | 933799d9f0aaf811b37aebf71db2634c4f80e23b (patch) | |
tree | 856a96f1d7f91ebb9a690078d13c6e3201753dc7 /Makefile | |
download | libskrift-933799d9f0aaf811b37aebf71db2634c4f80e23b.tar.gz libskrift-933799d9f0aaf811b37aebf71db2634c4f80e23b.tar.bz2 libskrift-933799d9f0aaf811b37aebf71db2634c4f80e23b.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..84c04d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +OBJ =\ + libskrift_calculate_dpi.o\ + libskrift_close_font.o\ + libskrift_create_context.o\ + libskrift_free_context.o\ + libskrift_get_grapheme_glyph.o\ + libskrift_get_cluster_glyph.o\ + libskrift_get_rendering_settings.o\ + libskrift_inches_to_pixels.o\ + libskrift_merge_glyphs.o\ + libskrift_millimeters_to_pixels.o\ + libskrift_open_font.o\ + libskrift_open_font_fd.o\ + libskrift_open_font_file.o\ + libskrift_open_font_mem.o\ + libskrift_points_to_pixels.o + +LIB_HDR =\ + libskrift.h + +HDR =\ + common.h\ + $(LIB_HDR) + +all: libskrift.a demo +$(OBJ): $(@:.o=.c) $(HDR) +demo.o: demo.c $(LIB_HDR) + +libskrift.a: $(OBJ) + $(AR) rc $@ $(OBJ) + $(AR) ts $@ > /dev/null + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +demo: demo.o libskrift.a + $(CC) -o $@ $@.o libskrift.a $(LDFLAGS) + +install: libskrift.a + mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" + mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + cp -- libskrift.a "$(DESTDIR)$(PREFIX)/lib" + cp -- libskrift.h "$(DESTDIR)$(PREFIX)/include" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libskrift.a" + -rm -f -- "$(DESTDIR)$(PREFIX)/include/libskrift.h" + +clean: + -rm -f -- *.o *.lo *.su libskrift.a libskrift.so libskrift.so.* + +.SUFFIXES: +.SUFFIXES: .c .o + +.PHONY: all install uninstall clean |