~cr3/+junk/dt

« back to all changes in this revision

Viewing changes to Makefile.win32-Cygwin

  • 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
# System makefile definitions for program makefiles
 
33
 
 
34
.SUFFIXES:      .ln
 
35
 
 
36
.c.ln:
 
37
                @lint -c $(LINTFLAGS) $<
 
38
 
 
39
.c~.ln:
 
40
                @echo $<
 
41
                @$(GET) -G$*.c $(GFLAGS) $<
 
42
                @lint -c $(LINTFLAGS) $*.c
 
43
                @rm -f $*.c
 
44
 
 
45
PRINTER=        lpr
 
46
 
 
47
PR_FLAGS=       -p -P28
 
48
 
 
49
TR_PRINTER=     $(PRINTER)
 
50
 
 
51
TR_FLAGS=       -t -P28
 
52
 
 
53
# Libraries the program links to which are considered volatile
 
54
 
 
55
LIBS=
 
56
 
 
57
# Libraries considered static
 
58
 
 
59
EXTLIBS=
 
60
 
 
61
LINTLIBS=
 
62
 
 
63
# P or G flag ( override on command line by invoking make PORG=-g )
 
64
 
 
65
# removed -ansi (rtm 11/25/03)
 
66
 
 
67
PORG      = -O3 -Wall\
 
68
                          -Waggregate-return\
 
69
                          -Wcast-align\
 
70
                          -Wimplicit\
 
71
                          -Wmissing-prototypes\
 
72
                          -Wnested-externs\
 
73
                          -Wno-parentheses
 
74
#                         -Wshadow
 
75
#                         -Wstrict-prototypes \
 
76
#                         -Wwrite-strings
 
77
 
 
78
AWK=    awk
 
79
#CFLAGS= $(PORG) -DFIFO -DTTY -D__MSDOS__
 
80
CFLAGS= $(PORG) -DFIFO -DTTY -D__WIN32__ -D_NT_SOURCE
 
81
CPP=    /lib/cpp
 
82
CPPOPTS= 
 
83
#CPPOPTS= -P
 
84
LDFLAGS=
 
85
 
 
86
# end of system makefile definitions
 
87
 
 
88
HDRS=           dt.h
 
89
 
 
90
### MKMF:SOURCES ###
 
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
                dtfifo.c        \
 
104
                dttape.c
 
105
 
 
106
 
 
107
### MKMF:OBJECTS ###
 
108
 
 
109
OBJS=           ${CFILES:.c=.o}
 
110
 
 
111
 
 
112
### MKMF:LINTOBJS ###
 
113
 
 
114
LINTOBJS=       ${CFILES:.c=.ln}
 
115
 
 
116
 
 
117
PROGRAM=        dt.exe
 
118
 
 
119
# system targets for program makefile
 
120
 
 
121
$(PROGRAM):     $(OBJS) $(XOBJS) $(LIBS)
 
122
                @echo -n loading $(PROGRAM) ... 
 
123
                @$(CC) -o $(PROGRAM) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(EXTLIBS)
 
124
                @echo done
 
125
 
 
126
print:;
 
127
                @$(PRINTER) $(PRINTFLAGS) $(CFILES)
 
128
 
 
129
prettyprint:;
 
130
                @vgrind $(CFILES) | $(TROFFPRINTER) $(TROFFPRINTERFLAGS)
 
131
 
 
132
lint:           $(LINTOBJS)
 
133
                lint $(LINTFLAGS) $(LINTOBJS) $(LINTLIBS)
 
134
                touch lint
 
135
 
 
136
clean:;
 
137
                @rm -f $(OBJS) $(PROGRAM)
 
138
 
 
139
tags:   $(CFILES) $(HDRS)
 
140
        ctags $(CFILES) $(HDRS)
 
141
 
 
142
# end of system targets for program makefile
 
143
 
 
144
depend: makedep
 
145
        echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
 
146
        echo '$$r makedep' >>eddep
 
147
        echo 'w' >>eddep
 
148
        cp Makefile Makefile.bak
 
149
        ed - Makefile < eddep
 
150
        rm eddep makedep makedep1 makedeperrs
 
151
 
 
152
makedep: ${CFILES}
 
153
        @cat /dev/null >makedep
 
154
        -(for i in ${CFILES} ; do \
 
155
                ${CPP} -M ${CPPOPTS} $$i >> makedep; done) \
 
156
                2>makedeperrs
 
157
        sed \
 
158
                -e 's,^.*genassym\.o:,assym.s assym.L:,' \
 
159
                -e 's,^\(.*\)\.o:,\1.o \1.ln:,' makedep > makedep1
 
160
        ${AWK} ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
 
161
                else { if (length(rec $$3) > 78) { print rec; rec = $$0; } \
 
162
                       else rec = rec " " $$3 } } \
 
163
              END { print rec } ' makedep1 > makedep
 
164
        @cat makedeperrs
 
165
        @(if [ -s makedeperrs ]; then false; fi)
 
166
 
 
167
 
 
168
# DO NOT DELETE THIS LINE
 
169