Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / lint / lpass2 / proto.make
1 # (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
2 # See the copyright notice in the ACK home directory, in the file "Copyright".
3 #
4 # $Id: proto.make,v 1.7 1994/06/24 12:25:54 ceriel Exp $
5
6 #       M A K E F I L E   F O R   L P A S S 2
7
8 #PARAMS         do not remove this line!
9
10 SRC_DIR =       $(SRC_HOME)/lang/cem/lint/lpass2
11 LPASS1 =        $(SRC_HOME)/lang/cem/cemcom
12
13 # Libraries and EM interface definitions
14 SYSLIB =        $(TARGET_HOME)/modules/lib/libsystem.$(LIBSUF)
15 STRLIB =        $(TARGET_HOME)/modules/lib/libstring.$(LIBSUF)
16 PRTLIB =        $(TARGET_HOME)/modules/lib/libprint.$(LIBSUF)
17 INPLIB =        $(TARGET_HOME)/modules/lib/libinput.$(LIBSUF)
18 ALLOCLIB =      $(TARGET_HOME)/modules/lib/liballoc.$(LIBSUF)
19 MALLOC =        $(TARGET_HOME)/modules/lib/malloc.$(SUF)
20 LLIBS =         $(INPLIB) $(PRTLIB) $(STRLIB) $(ALLOCLIB) $(MALLOC) $(SYSLIB)
21
22 INCLUDES =      -I$(TARGET_HOME)/modules/h -I$(TARGET_HOME)/modules/pkg \
23                 -I$(SRC_DIR) -I$(LPASS1) -I.
24 CFLAGS = $(COPTIONS) $(INCLUDES)
25 LDFLAGS = $(LDOPTIONS)
26 LINTFLAGS = $(LINTOPIONS) $(INCLUDES)
27
28 SRC =   $(SRC_DIR)/lpass2.c $(SRC_DIR)/checkargs.c \
29         $(SRC_DIR)/read.c $(SRC_DIR)/report.c \
30         $(SRC_DIR)/class.c $(SRC_DIR)/l_print3ack.c
31 OBJ =   lpass2.$(SUF) checkargs.$(SUF) read.$(SUF) report.$(SUF) class.$(SUF)
32
33 all:    lpass2 lint.exec
34
35 install:        all
36         -mkdir $(TARGET_HOME)/lib.bin/lint
37         cp lpass2 $(TARGET_HOME)/lib.bin/lint/lpass2
38         cp lint.exec $(TARGET_HOME)/bin/lint
39         if [ $(DO_MACHINE_INDEP) = y ] ; \
40         then    mk_manpage $(SRC_DIR)/lint.1 $(TARGET_HOME) ; \
41         fi
42
43 cmp:    all
44         -cmp lpass2 $(TARGET_HOME)/lib.bin/lint/lpass2
45         -cmp lint.exec $(TARGET_HOME)/bin/lint
46
47 pr:
48         @pr $(SRC_DIR)/proto.make $(SRC_DIR)/inpdef.str $(SRC_DIR)/class.h \
49                 $(SRC) lint
50
51 lint.exec:      $(SRC_DIR)/lint
52         sed -e 's|^EMDIR=.*|EMDIR=$(TARGET_HOME)|' < $(SRC_DIR)/lint > lint.exec
53         chmod +x lint.exec
54
55 lpass2: $(OBJ) next.$(SUF)
56         $(CC) $(LDFLAGS) $(OBJ) next.$(SUF) $(LLIBS) -o lpass2
57
58 next.c: $(LPASS1)/make.next $(SRC_DIR)/inpdef.str
59         $(LPASS1)/make.next $(SRC_DIR)/inpdef.str > next.c
60
61 tags:   $(SRC)
62         ctags $(SRC)
63
64 clean:
65         rm -f a.out core next.c inpdef.h *.$(SUF) lint.exec lpass2
66
67 lint:   inpdef.h next.c
68         $(LINT) $(LINTFLAGS) $(SRC) next.c
69
70 inpdef.h:       $(LPASS1)/make.allocd $(SRC_DIR)/inpdef.str
71         $(LPASS1)/make.allocd <$(SRC_DIR)/inpdef.str > inpdef.h
72
73 next.$(SUF):    next.c
74         $(CC) -c $(CFLAGS) next.c
75
76 checkargs.$(SUF): inpdef.h $(SRC_DIR)/private.h $(SRC_DIR)/checkargs.c
77         $(CC) -c $(CFLAGS) $(SRC_DIR)/checkargs.c
78
79 class.$(SUF): $(LPASS1)/l_class.h $(SRC_DIR)/class.h $(SRC_DIR)/class.c
80         $(CC) -c $(CFLAGS) $(SRC_DIR)/class.c
81
82 lpass2.$(SUF): $(LPASS1)/l_class.h $(LPASS1)/l_lint.h $(SRC_DIR)/class.h \
83         $(SRC_DIR)/private.h inpdef.h $(SRC_DIR)/lpass2.c
84         $(CC) -c $(CFLAGS) $(SRC_DIR)/lpass2.c
85
86 read.$(SUF): $(LPASS1)/l_class.h $(SRC_DIR)/class.h \
87         $(SRC_DIR)/private.h inpdef.h $(SRC_DIR)/read.c
88         $(CC) -c $(CFLAGS) $(SRC_DIR)/read.c
89
90 report.$(SUF): $(LPASS1)/l_class.h $(SRC_DIR)/class.h \
91         $(SRC_DIR)/private.h inpdef.h $(SRC_DIR)/report.c
92         $(CC) -c $(CFLAGS) $(SRC_DIR)/report.c