~cr3/+junk/dt

« back to all changes in this revision

Viewing changes to Makefile.mac_darwin

  • 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
# Updated by W Liu 8/16/05 for MAC Darwin
 
32
#  Added -DMacDarwin to CFLAGS.
 
33
#  Note: No AIO supported
 
34
 
 
35
# System makefile definitions for program makefiles
 
36
 
 
37
#.SUFFIXES:     .ln
 
38
#
 
39
#.c.ln:
 
40
#               @lint -c $(LINTFLAGS) $<
 
41
#
 
42
#.c~.ln:
 
43
#               @echo $<
 
44
#               @$(GET) -G$*.c $(GFLAGS) $<
 
45
#               @lint -c $(LINTFLAGS) $*.c
 
46
#               @rm -f $*.c
 
47
 
 
48
PRINTER=        lpr
 
49
 
 
50
PR_FLAGS=       -p -P28
 
51
 
 
52
TR_PRINTER=     $(PRINTER)
 
53
 
 
54
TR_FLAGS=       -t -P28
 
55
 
 
56
# Libraries the program links to which are considered volatile
 
57
 
 
58
LIBS=
 
59
 
 
60
# Libraries considered static
 
61
 
 
62
EXTLIBS=
 
63
#
 
64
# This library is necessary for AIO functions, but it is being
 
65
# omitted (for now), since AIO isn't working quite right (yet)!
 
66
# [ Note: I'm pretty sure the AIO failures are not 'dt's fault. ]
 
67
# BTW:  The failure is showing up as a data compare error, when
 
68
#       32-bit file offsets are used, or a get a premature EOF
 
69
#       when _FILE_OFFSET_BITS=64 is defined :-) damn!
 
70
#
 
71
#EXTLIBS= -lrt
 
72
 
 
73
LINTLIBS=
 
74
 
 
75
# P or G flag ( override on command line by invoking make PORG=-g )
 
76
 
 
77
PORG      = -O
 
78
 
 
79
AWK=    awk
 
80
CFLAGS+= $(PORG) -DFIFO -DMMAP -DTTY -DMacDarwin -DFreeBSD -D_BSD_SOURCE
 
81
CPP=    /usr/bin/cpp
 
82
CPPOPTS= 
 
83
LDFLAGS=
 
84
 
 
85
# end of system makefile definitions
 
86
 
 
87
HDRS=           dt.h
 
88
 
 
89
### MKMF:SOURCES ###
 
90
 
 
91
 
 
92
CFILES=         \
 
93
                dt.c            \
 
94
                dtgen.c         \
 
95
                dtinfo.c        \
 
96
                dtread.c        \
 
97
                dtwrite.c       \
 
98
                dtstats.c       \
 
99
                dttty.c         \
 
100
                dtutil.c        \
 
101
                dtusage.c       \
 
102
                dtprocs.c       \
 
103
                dtmmap.c        \
 
104
                dtfifo.c        \
 
105
                dttape.c        \
 
106
                dtaio.c
 
107
 
 
108
 
 
109
### MKMF:OBJECTS ###
 
110
 
 
111
OBJS=           ${CFILES:.c=.o}
 
112
 
 
113
 
 
114
### MKMF:LINTOBJS ###
 
115
 
 
116
LINTOBJS=       ${CFILES:.c=.ln}
 
117
 
 
118
 
 
119
PROGRAM=        dt
 
120
 
 
121
# system targets for program makefile
 
122
 
 
123
$(PROGRAM):     $(OBJS) $(XOBJS) $(LIBS)
 
124
                @echo -n loading $(PROGRAM) ... 
 
125
                @$(CC) -o $(PROGRAM) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(EXTLIBS)
 
126
                @echo done
 
127
 
 
128
print:;
 
129
                @$(PRINTER) $(PRINTFLAGS) $(CFILES)
 
130
 
 
131
prettyprint:;
 
132
                @vgrind $(CFILES) | $(TROFFPRINTER) $(TROFFPRINTERFLAGS)
 
133
 
 
134
lint:           $(LINTOBJS)
 
135
                lint $(LINTFLAGS) $(LINTOBJS) $(LINTLIBS)
 
136
                touch lint
 
137
 
 
138
clean:;
 
139
                @rm -f $(OBJS) $(PROGRAM)
 
140
 
 
141
tags:   $(CFILES) $(HDRS)
 
142
        ctags $(CFILES) $(HDRS)
 
143
        etags $(CFILES) $(HDRS)
 
144
 
 
145
# end of system targets for program makefile
 
146
 
 
147
depend: makedep
 
148
        echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
 
149
        echo '$$r makedep' >>eddep
 
150
        echo 'w' >>eddep
 
151
        cp Makefile Makefile.bak
 
152
        ed - Makefile < eddep
 
153
        rm eddep makedep makedep1 makedeperrs
 
154
 
 
155
makedep: ${CFILES}
 
156
        @cat /dev/null >makedep
 
157
        -(for i in ${CFILES} ; do \
 
158
                ${CPP} -M ${CPPOPTS} $(CFLAGS) $$i >> makedep; done) \
 
159
                2>makedeperrs
 
160
        sed \
 
161
                -e 's,^.*genassym\.o:,assym.s assym.L:,' \
 
162
                -e 's,^\(.*\)\.o:,\1.o \1.ln:,' makedep > makedep1
 
163
        ${AWK} ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
 
164
                else { if (length(rec $$3) > 78) { print rec; rec = $$0; } \
 
165
                       else rec = rec " " $$3 } } \
 
166
              END { print rec } ' makedep1 > makedep
 
167
        @cat makedeperrs
 
168
        @(if [ -s makedeperrs ]; then false; fi)
 
169
 
 
170
 
 
171
# DO NOT DELETE THIS LINE
 
172