Imported Upstream version 2.5.0
[debian/amanda] / contrib / gsc / makefile
1 #
2 # $Id: makefile,v 1.2 2001/08/10 17:12:22 ant Exp $
3 # Copyright (c) 1997 by Matthew Jacob
4 #
5 #       This software is free software; you can redistribute it and/or
6 #       modify it under the terms of the GNU Library General Public
7 #       License as published by the Free Software Foundation; version 2.
8 #
9 #       This software is distributed in the hope that it will be useful,
10 #       but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 #       Library General Public License for more details.
13 #
14 #       You should have received a copy of the GNU Library General Public
15 #       License along with this software; if not, write to the Free
16 #       Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18 #       The author may be reached via electronic communications at
19 #
20 #               mjacob@feral.com
21 #
22 #       or, via United States Postal Address
23 #
24 #               Matthew Jacob
25 #               1831 Castro Street
26 #               San Francisco, CA, 94131
27
28 #CC             = cc -qextchk -qlanglvl=ansi -qproto -qmaxmem=3000
29 CC              = gcc
30 RM              = rm -f
31 DEBUG_FLAG      =
32 KCFLAGS         = $(DEBUG_FLAG) -O
33 CFLAGS          = $(DEBUG_FLAG) -O
34
35 LDF1    =       -bI:/lib/kernex.exp -bI:/usr/lib/lowsys.exp
36 #LDF2   =       -lsys -lcsys
37
38 BINS    =       gscdd defgsc cfggsc ucfggsc tstinq
39 DATA    =       gsc.cat
40
41
42 all:    ${BINS} ${DATA}
43
44 gscdd:  gscdd.o
45         ${LD} -bl:$@.map -o $@ $@.o -e gsc_config ${LDF1} ${LDF2}
46
47 gscdd.o:        gscdd.c gscdds.h
48         $(CC) $(KCFLAGS) -c gscdd.c -DKERNEL -D_KERNEL  -D_IBMR2
49
50 cfggsc: cfggsc.c
51         $(CC) $(CFLAGS) -o $@ -lodm -lcfg $@.c
52
53 ucfggsc:        ucfggsc.c
54         $(CC) $(CFLAGS) -o $@ -lodm -lcfg $@.c
55
56 defgsc: defgsc.c
57         $(CC) $(CFLAGS) -o $@ -lodm -lcfg $@.c
58
59 tstinq: tstinq.c
60         $(CC) $(CFLAGS) -o $@ $@.c
61
62 gsc.cat:        makefile
63         ${RM} /tmp/catalog_tmp
64         echo '$$set 1 Feral Software Generic SCSI Messages' > /tmp/catalog_tmp
65         echo "1 Feral Software Generic SCSI Release 1.0" >> /tmp/catalog_tmp
66         gencat $@ /tmp/catalog_tmp
67         ${RM} /tmp/catalog_tmp
68
69 clean:
70         @${RM} ${BINS} ${DATA} *.map *.o
71