1# Quickie makefile to (sort of) automate various pounder tasks. 2 3# Copyright (C) 2003-2006 IBM 4# 5# This program is free software; you can redistribute it and/or 6# modify it under the terms of the GNU General Public License as 7# published by the Free Software Foundation; either version 2 of the 8# License, or (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13# General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program; if not, write to the Free Software 17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 18# 02111-1307, USA. 19 20# Quickie makefile to do pounder stuff. 21NAME=ltpounder 22CFLAGS=-O3 -Wall -g 23HELPERS=timed_loop infinite_loop run-helper fancy_timed_loop 24 25install:; 26 ./Install 27 28helpers: $(HELPERS) 29 30fancy_timed_loop: fancy_timed_loop.c debug.o 31 $(CC) $(CFLAGS) -o fancy_timed_loop fancy_timed_loop.c debug.o 32 33timed_loop: timed_loop.c debug.o 34 $(CC) $(CFLAGS) -o timed_loop timed_loop.c debug.o 35 36infinite_loop: infinite_loop.c debug.o 37 $(CC) $(CFLAGS) -o infinite_loop infinite_loop.c debug.o 38 39run-helper: run.c debug.o proclist.o 40 $(CC) $(CFLAGS) -o run-helper run.c debug.o proclist.o 41 42srctar:; 43 cd ../../../; make clean; tar -cvzf $(NAME)-`date '+%Y-%m-%d'`.src.tar.gz --exclude '*CVS*' $(NAME) 44 45bintar:; 46 echo "Making binary tarball for" `uname -m` "platform." 47 ./Install 48 cd ../../../; tar -czf $(NAME)-`date '+%Y-%m-%d'`.`uname -m`.tar.gz $(NAME) --exclude='*CVS*' 49 50helpers_clean:; 51 rm -rf $(HELPERS) *.o 52 53# Clean out all cruft from a pounder run 54clean: helpers_clean 55 ./pounder -u 56 if [ -d opt ]; then cd opt; for i in *; do if [ -d $$i ]; then cd $$i; make clean; cd -; fi; done; fi; 57 cd src; for i in *; do if [ -d $$i ]; then cd $$i; make clean; cd -; fi; done; 58 rm -rf tmp pounder.pid 59 60# Put everything back as it was when this tarball was unpacked. 61mrclean: helpers_clean; 62 ./pounder -u 63 rm -rf opt log run-helper infinite_loop timed_loop debug.o tmp proclist.o 64 find src/ -name Makefile | while read f; do cd `dirname $$f`; $(MAKE) clean; cd -; done; 65 rm -rf `find tests/* 2>/dev/null | grep -v CVS` 66 rm -rf pounder.pid 67 68distclean: mrclean; 69 70 71testtar:; 72 tar -cvzf default-tests.tar.gz tests/D* tests/T* 73