• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Disktest Makefile
3# Copyright (c) International Business Machines Corp., 2001
4#
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19#
20#  Please send e-mail to yardleyb@us.ibm.com if you have
21#  questions or comments.
22#
23#  Project Website:  TBD
24#
25#
26# $Id: Makefile.aix,v 1.3 2008/02/14 08:22:22 subrata_modak Exp $
27# $Log: Makefile.aix,v $
28# Revision 1.3  2008/02/14 08:22:22  subrata_modak
29# Disktest application update to version 1.4.2, by, Brent Yardley <yardleyb@us.ibm.com>
30#
31# Revision 1.10  2006/10/19 17:30:27  yardleyb
32# Added basic signal handling.
33#
34# Revision 1.9  2006/05/12 19:44:47  yardleyb
35# added CHANGELOG to distro
36# uninstall does not force a build
37#
38# Revision 1.8  2005/10/12 23:13:35  yardleyb
39# Updates to code to support new function in disktest version 1.3.x.
40# Actual changes are recorded in the README
41#
42# Revision 1.7  2005/06/02 20:16:19  yardleyb
43# Added changes for aix make
44#
45# Revision 1.6  2004/11/20 04:43:42  yardleyb
46# Minor code fixes.  Checking for alloc errors.
47#
48# Revision 1.5  2004/11/19 21:45:12  yardleyb
49# Fixed issue with code added for -F option.  Cased disktest
50# to SEG FAULT when cleaning up threads.
51#
52# Revision 1.4  2003/01/13 21:33:31  yardleyb
53# Added code to detect AIX volume size.
54# Updated mask for random LBA to use start_lba offset
55# Updated version to 1.1.10
56#
57# Revision 1.3  2002/04/24 01:59:45  yardleyb
58# Update to version v1.1.3
59#
60# Revision 1.2  2002/04/02 00:11:04  yardleyb
61# Corrected -D for each OS type
62#
63# Revision 1.1  2002/04/01 20:05:26  yardleyb
64# Modified Makefiles for linux,
65# Created Makefiles for windows/aix
66#
67# Revision 1.14  2002/03/07 03:38:52  yardleyb
68# Added dump function from command
69# line.  Created formatted dump output
70# for Data miscomare and command line.
71# Can now leave off filespec the full
72# path header as it will be added based
73# on -I.
74#
75# Revision 1.13  2002/02/28 04:25:45  yardleyb
76# reworked threading code
77# made locking code a macro.
78#
79# Revision 1.12  2002/02/26 19:35:59  yardleyb
80# Updates to parsing routines for user
81# input.  Added multipliers for -S and
82# -s command line arguments. Forced
83# default seeks to default if performing
84# a diskcache test.
85#
86# Revision 1.11  2002/02/21 21:42:15  yardleyb
87# Updated distro for man1
88#
89# Revision 1.10  2002/02/21 21:34:16  yardleyb
90# Cleaned up make dependancies
91# added install and uninstall
92#
93# Revision 1.9  2002/02/21 01:00:50  yardleyb
94# Added README and directory
95# structure to distro
96#
97# Revision 1.8  2002/02/19 02:46:37  yardleyb
98# Added changes to compile for AIX.
99# Update getvsiz so it returns a -1
100# if the ioctl fails and we handle
101# that fact correctly.  Added check
102# to force vsiz to always be greater
103# then stop_lba.
104#
105# Revision 1.7  2001/12/04 19:00:33  yardleyb
106# Updated to add new files and
107# filename changes
108#
109# Revision 1.6  2001/10/10 00:17:14  yardleyb
110# Added Copyright and GPL license text.
111# Miner bug fixes throughout text.
112#
113# Revision 1.5  2001/09/22 03:29:51  yardleyb
114# Added dependence on main.o for sfunc.h usage.h header files
115#
116# Revision 1.4  2001/09/10 22:14:27  yardleyb
117# Added clean up for tar file. Included man page in distro
118#
119# Revision 1.3  2001/09/06 18:23:30  yardleyb
120# Added duty cycle -D.  Updated usage. Added
121# make option to create .tar.gz of all files
122#
123# Revision 1.2  2001/09/05 22:44:42  yardleyb
124# Split out some of the special functions.
125# added O_DIRECT -Id.  Updated usage.  Lots
126# of clean up to functions.  Added header info
127# to pMsg.
128#
129# Revision 1.1  2001/09/04 19:28:07  yardleyb
130# Split usage out. Split header out.  Added usage text.
131# Made signal handler one function. code cleanup.
132#
133
134# -D "_LARGE_FILES" is used in AIX to support 64bit functions and data types
135# -D"_LARGEFILE64_SOURCE" -D"_FILE_OFFSET_BITS=64" is used in Linux to support 64bit functions and data types. -D"_GNU_SOURCE" is to support Linux O_DIRECT
136
137VER=v1.3.0
138GBLHDRS=main.h globals.h defs.h
139ALLHDRS=main.h sfunc.h parse.h childmain.h threading.h globals.h usage.h Getopt.h io.h dump.h timer.h stats.h signals.h
140SRCS=main.c sfunc.c parse.c childmain.c threading.c globals.c usage.c Getopt.c io.c dump.c timer.c stats.c signals.c
141OBJS=main.o sfunc.o parse.o childmain.o threading.o globals.o usage.o Getopt.o io.o dump.o timer.o stats.o signals.o
142
143CFLAGS= -O -D"AIX" -D"_THREAD_SAFE" -D"_GNU_SOURCE" -D"_LARGE_FILES" -D"_LARGEFILE64_SOURCE" -D"_FILE_OFFSET_BITS=64" -q64
144
145all: $(OBJS) disktest
146
147disktest: $(OBJS) $(SRCS) $(ALLHDRS)
148	$(CC) $(CFLAGS) -lpthread -odisktest $(OBJS)
149
150main.o: main.c $(ALLHDRS)
151sfunc.o: sfunc.c sfunc.h $(GBLHDRS)
152parse.o: parse.c parse.h sfunc.h $(GBLHDRS)
153childmain.o: childmain.c childmain.h sfunc.h parse.h threading.h $(GBLHDRS)
154threading.o: threading.c threading.h childmain.h sfunc.h $(GBLHDRS)
155globals.o: globals.c threading.h $(GBLHDRS)
156usage.o: usage.c usage.h
157Getopt.o: Getopt.c Getopt.h
158io.o: io.c io.h $(GBLHDRS)
159dump.o: dump.c dump.h $(GBLHDRS)
160stats.o: stats.c stats.h $(GBLHDRS)
161signals.o: signals.c signals.h $(GBLHDRS)
162
163install: disktest
164	cp disktest /usr/bin
165	cp man1/disktest.1.gz /usr/share/man/man1
166	gunzip /usr/share/man/man1/disktest.1.gz
167
168uninstall:
169	rm -f /usr/bin/disktest
170	rm -f /usr/share/man/man1/disktest.1
171
172clean:
173	rm -f disktest $(OBJS)
174
175all-clean: clean
176	rm -f *~ *tar* *zip*
177
178distro: all-clean
179	mkdir disktest.$(VER)
180	mkdir disktest.$(VER)/man1
181	cp ./Makefile ./*.[ch] ./LICENSE ./README ./CHANGELOG disktest.$(VER)
182	cp ./man1/disktest.1 disktest.$(VER)/man1
183	tar cvf ./disktest.$(VER).tar disktest.$(VER)
184	rm -rf disktest.$(VER)
185	gzip ./disktest.$(VER).tar
186