# $Id$ ifeq ($(devel_prefix),) devel_prefix=$(prefix) endif ifeq ($(libsfx),) libsfx=lib endif ifeq ($(slibsfx),) slibsfx=$(libsfx) endif MVERSION=$(shell awk '/^\#define HPGS_CAIRO_(MAJOR|MINOR)_VERSION/ {printf(".%s",$$3);}' $(srcdir)/hpgscairo.h) VERSION=$(shell awk '/^\#define HPGS_CAIRO_(MAJOR|MINOR|PATCH)_VERSION/ {printf(".%s",$$3);} /^\#define HPGS_CAIRO_EXTRA_VERSION/ {printf("%s",$$3);}' $(srcdir)/hpgscairo.h) SLIBSOURCES= hpgscairo.c \ hpgscairopng.c \ hpgscairoglobal.c SLIBHEADERS= hpgscairo.h SLIBOBJS = $(addsuffix .$(OBJ), $(basename $(SLIBSOURCES))) PLUGINSOURCES= hpgsplugin.c # # if you add a language here, go to $(srcdir)/po and issue # # msginit -i hpgscairo.pot -o hpgscairo_.po # POLANGS = de PLUGINOBJS = $(addsuffix .$(OBJ), $(basename $(PLUGINSOURCES))) PLUGINLIBS=$(SLIB) $(LIBS) %.depend: $(srcdir)/%.c $(CC) -M $(CFLAGS) $< > $@ %.o: $(srcdir)/%.c $(CC) -c $(CFLAGS) -o $@ $< all: $(SLIB) $(PLUGIN) install: all rm -f $(prefix)/$(slibsfx)/$(SLIB); cp $(SLIB) $(prefix)/$(slibsfx) cd $(prefix)/$(slibsfx); $(LNS) $(SLIB) $(SLIBALIAS1) rm -f $(prefix)/lib/hpgs/$(PLUGIN) if test ! -d $(prefix)/lib/hpgs; then mkdir $(prefix)/lib/hpgs; fi cp $(PLUGIN) $(prefix)/lib/hpgs install-devel: install cp $(addprefix $(srcdir)/, $(SLIBHEADERS)) $(devel_prefix)/include cd $(devel_prefix)/include; chmod 644 $(SLIBHEADERS) cd $(devel_prefix)/$(libsfx); if test "$(prefix)/$(slibsfx)" = "$(devel_prefix)/$(libsfx)"; then $(LNS) $(SLIB) $(SLIBALIAS2); else $(LNS) $(prefix)/$(slibsfx)/$(SLIB) $(SLIBALIAS2); fi install-po: for lang in $(POLANGS); do mkdir -p $(prefix)/share/locale/$$lang/LC_MESSAGES; msgfmt -o $(prefix)/share/locale/$$lang/LC_MESSAGES/hpgscairo.mo $(srcdir)/po/hpgscairo_$$lang.po; done clean: rm -f *~ *.o $(SLIB) $(SLIBALIAS1) $(SLIBALIAS2) $(PLUGIN) rm -rf .libs distclean: clean rm -f *.depend $(SLIB): $(SLIBOBJS) $(SLD) $(SLDFLAGS) $(SLIBLDFLAGS) -o $@ $(SLIBOBJS) $(LIBS) ln -sf $(SLIB) $(SLIBALIAS1) ln -sf $(SLIB) $(SLIBALIAS2) $(PLUGIN): $(PLUGINOBJS) $(SLD) $(SLDFLAGS) -o $@ $(PLUGINOBJS) $(PLUGINLIBS) # # dependencies # ifneq ($(dep),no) include $(addsuffix .depend, $(basename $(SLIBOBJS) $(PLUGINOBJS))) endif