]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Add install target.
authorJames Bursa <james@netsurf-browser.org>
Sun, 3 Feb 2008 19:10:05 +0000 (19:10 -0000)
committerJames Bursa <james@netsurf-browser.org>
Sun, 3 Feb 2008 19:10:05 +0000 (19:10 -0000)
svn path=/trunk/libsvgtiny/; revision=3836

makefile

index 565e46e52e0a69363782dbf2943a52196ba04d90..1c62c951e7b16fb2e23c8a8459266f3020322d9f 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,6 +13,7 @@ CFLAGS = -std=c99 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
        -Wmissing-prototypes -Wmissing-declarations \
        -Wnested-externs -Winline -Wno-cast-align
 ARFLAGS = cr
+INSTALL = install
 
 ifeq ($(TARGET),riscos)
 GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
@@ -23,9 +24,11 @@ CFLAGS += -Driscos -mpoke-function-name -I$(GCCSDK_INSTALL_ENV)/include \
        -I$(GCCSDK_INSTALL_ENV)/include/libxml2
 LIBS = -L$(GCCSDK_INSTALL_ENV)/lib -lxml2 -lz
 EXEEXT = ,ff8
+PREFIX = $(GCCSDK_INSTALL_ENV)
 else
 CFLAGS += -g `xml2-config --cflags` -fgnu89-inline
 LIBS = `xml2-config --libs`
+PREFIX = /usr/local
 endif
 
 ifeq ($(TARGET),)
@@ -63,6 +66,10 @@ $(OBJDIR)/%.o: %.c $(HDRS)
        @echo "   GPERF:" $<
        @gperf --output-file=$@ $<
 
+install: $(LIBDIR)/libsvgtiny.a
+       $(INSTALL) -t $(PREFIX)/lib $(LIBDIR)/libsvgtiny.a
+       $(INSTALL) -t $(PREFIX)/include $(HDRS)
+
 clean:
        -rm $(OBJS) $(LIBDIR)/libsvgtiny.a $(BINDIR)/svgtiny_test$(EXEEXT) colors.c