blob: 58863e6e17cec1eda1f3d7f55894a2015a50b6c9 [file] [log] [blame]
mridge1c5ac212006-01-26 22:16:41 +00001# 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.
mridge5b8e4652006-02-01 20:47:43 +000021NAME=ltpounder
mridge1c5ac212006-01-26 22:16:41 +000022CFLAGS=-O3 -Wall -g
23CC=gcc
24HELPERS=timed_loop infinite_loop run-helper fancy_timed_loop
25
26install:;
27 ./Install
28
29helpers: $(HELPERS)
30
31fancy_timed_loop: fancy_timed_loop.c debug.o
32 $(CC) $(CFLAGS) -o fancy_timed_loop fancy_timed_loop.c debug.o
33
34timed_loop: timed_loop.c debug.o
35 $(CC) $(CFLAGS) -o timed_loop timed_loop.c debug.o
36
37infinite_loop: infinite_loop.c debug.o
38 $(CC) $(CFLAGS) -o infinite_loop infinite_loop.c debug.o
39
40run-helper: run.c debug.o proclist.o
41 $(CC) $(CFLAGS) -o run-helper run.c debug.o proclist.o
42
43srctar:;
mridge5b8e4652006-02-01 20:47:43 +000044 cd ../../../; make clean; tar -cvzf $(NAME)-`date '+%Y-%m-%d'`.src.tar.gz --exclude '*CVS*' $(NAME)
mridge1c5ac212006-01-26 22:16:41 +000045
46bintar:;
47 echo "Making binary tarball for" `uname -m` "platform."
48 ./Install
mridge5b8e4652006-02-01 20:47:43 +000049 cd ../../../; tar -czf $(NAME)-`date '+%Y-%m-%d'`.`uname -m`.tar.gz $(NAME) --exclude='*CVS*'
mridge1c5ac212006-01-26 22:16:41 +000050
51helpers_clean:;
52 rm -rf $(HELPERS) *.o
53
54# Clean out all cruft from a pounder run
55clean: helpers_clean
mridge5b8e4652006-02-01 20:47:43 +000056 ./pounder -u
mridge1c5ac212006-01-26 22:16:41 +000057 if [ -d opt ]; then cd opt; for i in *; do if [ -d $$i ]; then cd $$i; make clean; cd -; fi; done; fi;
58 cd src; for i in *; do if [ -d $$i ]; then cd $$i; make clean; cd -; fi; done;
59 rm -rf tmp pounder.pid
60
61# Put everything back as it was when this tarball was unpacked.
62mrclean: helpers_clean;
mridge5b8e4652006-02-01 20:47:43 +000063 ./pounder -u
mridge1c5ac212006-01-26 22:16:41 +000064 rm -rf opt log run-helper infinite_loop timed_loop debug.o tmp proclist.o
65 find src/ -name Makefile | while read f; do cd `dirname $$f`; $(MAKE) clean; cd -; done;
66 rm -rf `find tests/* 2>/dev/null | grep -v CVS`
67 rm -rf pounder.pid
68
69distclean: mrclean;
70
71
72testtar:;
73 tar -cvzf default-tests.tar.gz tests/D* tests/T*