blob: 7d7c943442b3afd035913f68c598a40c2f4ef736 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#
2# Makefile for STREAMS modules for Solaris 2.
3#
4# $Id: Makefile.sol2gcc,v 1.4 2004/11/15 00:57:54 carlsonj Exp $
5#
6
7include Makedefs.sol2
8
9COPTS += -fno-builtin
10
11COMP_OBJS = ppp_comp.o bsd-comp.o deflate.o zlib.o vjcompress.o \
12 ppp_comp_mod.o
13
14all: ppp ppp_ahdl ppp_comp
15
16ppp: ppp.o ppp_mod.o
17 $(LD) -r -o $@ ppp.o ppp_mod.o
18 chmod +x $@
19
20ppp_ahdl: ppp_ahdlc.o ppp_ahdlc_mod.o
21 $(LD) -r -o $@ ppp_ahdlc.o ppp_ahdlc_mod.o
22 chmod +x $@
23
24ppp_comp: $(COMP_OBJS)
25 $(LD) -r -o $@ $(COMP_OBJS)
26 chmod +x $@
27
28bsd-comp.o: ../modules/bsd-comp.c
29 $(CC) $(CFLAGS) -c $?
30deflate.o: ../modules/deflate.c
31 $(CC) $(CFLAGS) -c $?
32ppp.o: ppp.c
33 $(CC) $(CFLAGS) -c $?
34ppp_mod.o: ppp_mod.c
35 $(CC) $(CFLAGS) -c $?
36ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
37 $(CC) $(CFLAGS) -c $?
38ppp_ahdlc.o: ppp_ahdlc.c
39 $(CC) $(CFLAGS) -c $?
40ppp_comp.o: ppp_comp.c
41 $(CC) $(CFLAGS) -c $?
42ppp_comp_mod.o: ppp_comp_mod.c
43 $(CC) $(CFLAGS) -c $?
44vjcompress.o: ../modules/vjcompress.c
45 $(CC) $(CFLAGS) -c $?
46zlib.o: ../common/zlib.c
47 $(CC) $(CFLAGS) -c $?
48
49install:
50 /usr/sbin/modunload -i 0
51 cp ppp ppp.conf /kernel/drv
52 cp ppp_comp ppp_ahdl /kernel/strmod
53 if grep clone:ppp /etc/minor_perm; then :; else \
54 echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
55 /usr/sbin/rem_drv ppp 2>/dev/null || true
56 /usr/sbin/modunload -i 0
57 /usr/sbin/add_drv ppp
58
59SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
60 ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
61 ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
62
63lint:
64 $(LINT32) $(SRCS)
65
66clean:
67 rm -f ppp ppp_comp ppp_ahdl *.o *~ core
68 rm -f *.ln