CURDIR=nocracks MANPAGES=/usr/share/man PACKAGE_REV:=$(shell ./makeversion $(BUILD_SVNVER)) PROGS=nocracks nocracks-shell bullet graph graph-svg table title nocracks-time DOCS=operations.pdf OPTIONS=-O2 -Wall -g -DVERSION=\"$(PACKAGE_REV)\" .SUFFIXES: .o .tex .tlcc .cc .png .uml all: $(PROGS) doc: $(DOCS) nocracks: nocracks.tlcc cctlcc $(OPTIONS) nocracks.tlcc -o nocracks -llinuxconf -lstdc++ nocracks-shell: nocracks-shell.tlcc cctlcc $(OPTIONS) nocracks-shell.tlcc -o nocracks-shell -llinuxconf -lstdc++ bullet: bullet.tlcc util.o cctlcc $(OPTIONS) bullet.tlcc -o bullet util.o -llinuxconf -lstdc++ graph: graph.tlcc util.o cctlcc $(OPTIONS) graph.tlcc -o graph util.o -llinuxconf -lstdc++ graph-svg: graph-svg.tlcc util.o math.o cctlcc $(OPTIONS) graph-svg.tlcc -o graph-svg util.o math.o -llinuxconf -lstdc++ -lm table: table.tlcc util.o cctlcc $(OPTIONS) table.tlcc -o table util.o -llinuxconf -lstdc++ title: title.tlcc util.o cctlcc $(OPTIONS) title.tlcc -o title util.o -llinuxconf -lstdc++ math.o: math.tlcc cctlcc $(OPTIONS) -c math.tlcc -o math.o math: math.tlcc cctlcc $(OPTIONS) -DTEST math.tlcc -o /tmp/math -lstdc++ -lm nocracks-time: nocracks-time.tlcc cctlcc $(OPTIONS) nocracks-time.tlcc -o nocracks-time -lstdc++ util.o: util.tlcc cctlcc $(OPTIONS) -c util.tlcc -o util.o PNGS= operations.pdf: operations.tex $(PNGS) pdflatex operations.tex .uml.png: plantuml $< clean: rm -f $(PROGS) $(DOCS) *.o *.dvi *.log *.aux *.png install: mkdir -p $(RPM_BUILD_ROOT)/usr/bin install -m755 nocracks $(RPM_BUILD_ROOT)/usr/bin install -m755 nocracks-shell $(RPM_BUILD_ROOT)/usr/bin RPMTOPDIR=$(HOME)/rpmbuild RPM=rpmbuild buildspec: sed s/RPMREV/$(RPMREV)/ <$(CURDIR).spec \ | sed s/REV/$(PACKAGE_REV)/ \ > $(RPMTOPDIR)/SPECS/$(CURDIR)-$(PACKAGE_REV).spec rm -fr /tmp/$(CURDIR)-$(PACKAGE_REV) mkdir /tmp/$(CURDIR)-$(PACKAGE_REV) cp -a * /tmp/$(CURDIR)-$(PACKAGE_REV)/. (cd /tmp/$(CURDIR)-$(PACKAGE_REV)/ && make clean && \ cd .. && tar zcvf $(RPMTOPDIR)/SOURCES/$(CURDIR)-$(PACKAGE_REV).src.tar.gz $(CURDIR)-$(PACKAGE_REV)) rm -fr /tmp/$(CURDIR)-$(PACKAGE_REV) buildrpm: buildspec unset LD_PRELOAD; $(RPM) -ba $(RPMTOPDIR)/SPECS/$(CURDIR)-$(PACKAGE_REV).spec REPO=http://svn.solucorp.qc.ca/repos/solucorp/blackhole distrpm: @eval `svn cat $(REPO)/trunk/Makefile | grep ^PACKAGE_REV=` ; \ $(MAKE) COPY="svn export --force $(REPO)/trunk/" \ PACKAGE_REV="$${PACKAGE_REV}r`svn st -u Makefile | tail -1 | while read a b c d ; do echo $$d ; done`" \ buildrpm