MVERSION=$(shell awk '/^\#define HPGS_(MAJOR|MINOR)_VERSION/ {printf(".%s",$$3);}' $(top_srcdir)/hpgs.h) VERSION=$(shell awk '/^\#define HPGS_[A-Z]+_VERSION/ {printf(".%s",$$3);}' $(top_srcdir)/hpgs.h) PLUGINSOURCES= hpgsplugin.c \ hpgscairo.c PLUGINOBJS = $(addsuffix .$(OBJ), $(basename $(PLUGINSOURCES))) PLUGINLIBS=$(LIBS) %.depend: $(srcdir)/%.c $(CC) -M $(CFLAGS) $< > $@ %.o: $(srcdir)/%.c $(CC) -c $(CFLAGS) -o $@ $< all: $(PLUGIN) install: all rm -f $(prefix)/lib/hpgs/$(PLUGIN) if test ! -d $(prefix)/lib/hpgs; then mkdir $(prefix)/lib/hpgs; fi cp $(PLUGIN) $(prefix)/lib/hpgs clean: rm -f *~ *.o $(PLUGIN) rm -rf .libs distclean: clean rm -f *.depend $(PLUGIN): $(PLUGINOBJS) $(SLD) $(SLDFLAGS) -o $@ $(PLUGINOBJS) $(PLUGINLIBS) # # dependencies # ifneq ($(dep),no) include $(addsuffix .depend, $(basename $(PLUGINOBJS))) endif