lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | # |
| 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 | |
| 7 | include Makedefs.sol2 |
| 8 | |
| 9 | COPTS += -fno-builtin |
| 10 | |
| 11 | COMP_OBJS = ppp_comp.o bsd-comp.o deflate.o zlib.o vjcompress.o \ |
| 12 | ppp_comp_mod.o |
| 13 | |
| 14 | all: ppp ppp_ahdl ppp_comp |
| 15 | |
| 16 | ppp: ppp.o ppp_mod.o |
| 17 | $(LD) -r -o $@ ppp.o ppp_mod.o |
| 18 | chmod +x $@ |
| 19 | |
| 20 | ppp_ahdl: ppp_ahdlc.o ppp_ahdlc_mod.o |
| 21 | $(LD) -r -o $@ ppp_ahdlc.o ppp_ahdlc_mod.o |
| 22 | chmod +x $@ |
| 23 | |
| 24 | ppp_comp: $(COMP_OBJS) |
| 25 | $(LD) -r -o $@ $(COMP_OBJS) |
| 26 | chmod +x $@ |
| 27 | |
| 28 | bsd-comp.o: ../modules/bsd-comp.c |
| 29 | $(CC) $(CFLAGS) -c $? |
| 30 | deflate.o: ../modules/deflate.c |
| 31 | $(CC) $(CFLAGS) -c $? |
| 32 | ppp.o: ppp.c |
| 33 | $(CC) $(CFLAGS) -c $? |
| 34 | ppp_mod.o: ppp_mod.c |
| 35 | $(CC) $(CFLAGS) -c $? |
| 36 | ppp_ahdlc_mod.o: ppp_ahdlc_mod.c |
| 37 | $(CC) $(CFLAGS) -c $? |
| 38 | ppp_ahdlc.o: ppp_ahdlc.c |
| 39 | $(CC) $(CFLAGS) -c $? |
| 40 | ppp_comp.o: ppp_comp.c |
| 41 | $(CC) $(CFLAGS) -c $? |
| 42 | ppp_comp_mod.o: ppp_comp_mod.c |
| 43 | $(CC) $(CFLAGS) -c $? |
| 44 | vjcompress.o: ../modules/vjcompress.c |
| 45 | $(CC) $(CFLAGS) -c $? |
| 46 | zlib.o: ../common/zlib.c |
| 47 | $(CC) $(CFLAGS) -c $? |
| 48 | |
| 49 | install: |
| 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 | |
| 59 | SRCS = 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 | |
| 63 | lint: |
| 64 | $(LINT32) $(SRCS) |
| 65 | |
| 66 | clean: |
| 67 | rm -f ppp ppp_comp ppp_ahdl *.o *~ core |
| 68 | rm -f *.ln |