blob: 70f945b8dbbba2b26210f7b05871a7697d199389 [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
Chris Dearman37550cf2012-10-17 19:54:01 -07004#
mridge1c5ac212006-01-26 22:16:41 +00005# 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.
Chris Dearman37550cf2012-10-17 19:54:01 -070014#
mridge1c5ac212006-01-26 22:16:41 +000015# 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
mridge1c5ac212006-01-26 22:16:41 +000023HELPERS=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:;
mridge5b8e4652006-02-01 20:47:43 +000043 cd ../../../; make clean; tar -cvzf $(NAME)-`date '+%Y-%m-%d'`.src.tar.gz --exclude '*CVS*' $(NAME)
mridge1c5ac212006-01-26 22:16:41 +000044
45bintar:;
46 echo "Making binary tarball for" `uname -m` "platform."
47 ./Install
mridge5b8e4652006-02-01 20:47:43 +000048 cd ../../../; tar -czf $(NAME)-`date '+%Y-%m-%d'`.`uname -m`.tar.gz $(NAME) --exclude='*CVS*'
mridge1c5ac212006-01-26 22:16:41 +000049
50helpers_clean:;
51 rm -rf $(HELPERS) *.o
52
53# Clean out all cruft from a pounder run
54clean: helpers_clean
mridge5b8e4652006-02-01 20:47:43 +000055 ./pounder -u
mridge1c5ac212006-01-26 22:16:41 +000056 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;
mridge5b8e4652006-02-01 20:47:43 +000062 ./pounder -u
mridge1c5ac212006-01-26 22:16:41 +000063 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*