From: James Bursa Date: Sun, 3 Feb 2008 19:10:05 +0000 (-0000) Subject: Add install target. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6cf39ca675e80d5207c635394a0edc7b33ea9642;p=libsvgtiny.git Add install target. svn path=/trunk/libsvgtiny/; revision=3836 --- diff --git a/makefile b/makefile index 565e46e..1c62c95 100644 --- 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