~cr3/+junk/dt

« back to all changes in this revision

Viewing changes to Makefile.aix-aio

  • Committer: Marc Tardif
  • Date: 2010-04-14 19:09:45 UTC
  • Revision ID: marc.tardif@canonical.com-20100414190945-op293hsog8niroma
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# %Z%%M% %I% %E% 1990 by Robin Miller
 
3
#
 
4
#/****************************************************************************
 
5
# *                                                                          *
 
6
# *                       COPYRIGHT (c) 1990 - 2004                          *
 
7
# *                        This Software Provided                            *
 
8
# *                                  By                                      *
 
9
# *                       Robin's Nest Software Inc.                         *
 
10
# *                                                                          *
 
11
# * Permission to use, copy, modify, distribute and sell this software and   *
 
12
# * its documentation for any purpose and without fee is hereby granted      *
 
13
# * provided that the above copyright notice appear in all copies and that   *
 
14
# * both that copyright notice and this permission notice appear in the      *
 
15
# * supporting documentation, and that the name of the author not be used    *
 
16
# * in advertising or publicity pertaining to distribution of the software   *
 
17
# * without specific, written prior permission.                              *
 
18
# *                                                                          *
 
19
# * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,        *
 
20
# * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN      *
 
21
# * NO EVENT SHALL HE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL   *
 
22
# * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR    *
 
23
# * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS  *
 
24
# * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF   *
 
25
# * THIS SOFTWARE.                                                           *
 
26
# *                                                                          *
 
27
# ****************************************************************************/
 
28
#
 
29
# Makefile -- makefile for program 'dt'
 
30
#       
 
31
 
 
32
### MKMF:DEFINITIONS ###
 
33
 
 
34
 
 
35
# System makefile definitions for program makefiles
 
36
 
 
37
.SUFFIXES:      .ln
 
38
 
 
39
.c.ln:
 
40
#               @lint -i $(LINTFLAGS) $<
 
41
                @lint -c $(LINTFLAGS) $<
 
42
 
 
43
#.c~.ln:
 
44
#               @echo $<
 
45
#               @$(GET) -G$*.c $(GFLAGS) $<
 
46
#               @lint -i $(LINTFLAGS) $*.c
 
47
#               @lint -c $(LINTFLAGS) $*.c
 
48
#               @rm -f $*.c
 
49
 
 
50
PRINTER=        lpr
 
51
 
 
52
PR_FLAGS=       -p -P28
 
53
 
 
54
TR_PRINTER=     $(PRINTER)
 
55
 
 
56
TR_FLAGS=       -t -P28
 
57
 
 
58
# Libraries the program links to which are considered volatile
 
59
 
 
60
LIBS=
 
61
 
 
62
# Libraries considered static
 
63
 
 
64
EXTLIBS=
 
65
 
 
66
LINTLIBS=
 
67
 
 
68
# P or G flag ( override on command line by invoking make PORG=-g )
 
69
 
 
70
PORG      = -O3
 
71
 
 
72
AWK=    awk
 
73
 
 
74
CC=     gcc
 
75
CFLAGS= $(PORG) -DAIO -DMMAP -DFIFO -DTTY -DRAND48 -DAIX -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_BIG_ENDIAN_=1
 
76
CPP=    /usr/local/bin/cpp
 
77
CPPOPTS= -M ${CFLAGS}
 
78
LDFLAGS= 
 
79
LINTFLAGS=
 
80
 
 
81
# end of system makefile definitions
 
82
 
 
83
 
 
84
HDRS=           dt.h
 
85
 
 
86
### MKMF:SOURCES ###
 
87
 
 
88
 
 
89
CFILES=         \
 
90
                dt.c            \
 
91
                dtaio.c         \
 
92
                dtfifo.c        \
 
93
                dtgen.c         \
 
94
                dtinfo.c        \
 
95
                dtmmap.c        \
 
96
                dtprocs.c       \
 
97
                dtread.c        \
 
98
                dtwrite.c       \
 
99
                dtstats.c       \
 
100
                dttape.c        \
 
101
                dttty.c         \
 
102
                dtutil.c        \
 
103
                dtusage.c
 
104
 
 
105
 
 
106
### MKMF:OBJECTS ###
 
107
 
 
108
OBJS=           ${CFILES:.c=.o}
 
109
 
 
110
 
 
111
### MKMF:LINTOBJS ###
 
112
 
 
113
LINTOBJS=       ${CFILES:.c=.ln}
 
114
 
 
115
 
 
116
### MKMF:TARGETS ###
 
117
 
 
118
PROGRAM=        dt
 
119
 
 
120
 
 
121
# system targets for program makefile
 
122
 
 
123
 
 
124
$(PROGRAM):     $(OBJS) $(XOBJS) $(LIBS)
 
125
#               @echo -n loading $(PROGRAM) ... 
 
126
                $(CC) -o $(PROGRAM) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(EXTLIBS)
 
127
                @echo done
 
128
 
 
129
print:;
 
130
                @$(PRINTER) $(PRINTFLAGS) $(CFILES)
 
131
 
 
132
prettyprint:;
 
133
                @vgrind $(CFILES) | $(TROFFPRINTER) $(TROFFPRINTERFLAGS)
 
134
 
 
135
lint:           $(LINTOBJS)
 
136
                lint $(LINTFLAGS) $(LINTOBJS) $(LINTLIBS)
 
137
                touch lint
 
138
 
 
139
clean:;
 
140
                @rm -f $(OBJS) $(PROGRAM)
 
141
 
 
142
tags:   $(CFILES) $(HDRS)
 
143
        ctags -wt $(CFILES) $(HDRS)
 
144
 
 
145
# end of system targets for program makefile
 
146
 
 
147
 
 
148
depend: makedep
 
149
        echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
 
150
        echo '$$r makedep' >>eddep
 
151
        echo 'w' >>eddep
 
152
        cp Makefile Makefile.bak
 
153
        ex - Makefile < eddep
 
154
        rm eddep makedep makedep1 makedeperrs
 
155
 
 
156
# Kinda Micky Mouse, but it's better than nothing (IMHO) :-)
 
157
makedep: ${CFILES}
 
158
        @cat /dev/null >makedep
 
159
        -(for i in ${CFILES} ; do \
 
160
                ${CPP} ${CPPOPTS} $$i >> makedep; done) \
 
161
                2>makedeperrs
 
162
        sed \
 
163
                -e 's,\/local\/lib\/gcc-lib/\(.*\)\/include,\/include,' \
 
164
                -e 's,^\(.*\)\.o:,\1.o \1.ln:,' makedep > makedep1
 
165
        ${AWK} ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
 
166
                else { if (length(rec $$3) > 78) { print rec; rec = $$0; } \
 
167
                       else rec = rec " " $$3 } } \
 
168
              END { print rec } ' makedep1 > makedep
 
169
        @cat makedeperrs
 
170
        @(if [ -s makedeperrs ]; then false; fi)
 
171
 
 
172
 
 
173
# DO NOT DELETE THIS LINE
 
174