2 # Makefile for 64-bit STREAMS modules for Solaris 2.
4 # $Id: Makefile.sol2gcc-64,v 1.3 2004/11/15 00:57:54 carlsonj Exp $
9 # gcc flags for LP64 compilation / linkage
10 COPTS += -mcpu=v9 -m64 -mcmodel=medlow -mstack-bias -fno-builtin
12 # subdirectory where 64-bit objects / binaries will be placed
15 # Name of legacy Makefile (for 32-bit binaries)
16 STD_MAKE = Makefile.sol2gcc
18 COMP_OBJS = $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o \
19 $(LP64DIR)/deflate.o $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o \
20 $(LP64DIR)/ppp_comp_mod.o
22 all: std_objs $(LP64DIR) ppp ppp_ahdl ppp_comp
25 $(MAKE) -f $(STD_MAKE) all
27 ppp: $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
28 $(LD) -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
29 chmod +x $(LP64DIR)/$@
31 ppp_ahdl: $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
32 $(LD) -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp_ahdlc.o \
33 $(LP64DIR)/ppp_ahdlc_mod.o
34 chmod +x $(LP64DIR)/$@
36 ppp_comp: $(COMP_OBJS)
37 $(LD) -r -o $(LP64DIR)/$@ $(COMP_OBJS)
38 chmod +x $(LP64DIR)/$@
40 $(LP64DIR)/bsd-comp.o: ../modules/bsd-comp.c
41 $(CC) $(CFLAGS) -c $? -o $@
42 $(LP64DIR)/deflate.o: ../modules/deflate.c
43 $(CC) $(CFLAGS) -c $? -o $@
44 $(LP64DIR)/ppp.o: ppp.c
45 $(CC) $(CFLAGS) -c $? -o $@
46 $(LP64DIR)/ppp_mod.o: ppp_mod.c
47 $(CC) $(CFLAGS) -c $? -o $@
48 $(LP64DIR)/ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
49 $(CC) $(CFLAGS) -c $? -o $@
50 $(LP64DIR)/ppp_ahdlc.o: ppp_ahdlc.c
51 $(CC) $(CFLAGS) -c $? -o $@
52 $(LP64DIR)/ppp_comp.o: ppp_comp.c
53 $(CC) $(CFLAGS) -c $? -o $@
54 $(LP64DIR)/ppp_comp_mod.o: ppp_comp_mod.c
55 $(CC) $(CFLAGS) -c $? -o $@
56 $(LP64DIR)/vjcompress.o: ../modules/vjcompress.c
57 $(CC) $(CFLAGS) -c $? -o $@
58 $(LP64DIR)/zlib.o: ../common/zlib.c
59 $(CC) $(CFLAGS) -c $? -o $@
65 /usr/sbin/modunload -i 0
66 cp ppp ppp.conf /kernel/drv
67 cp ppp_comp ppp_ahdl /kernel/strmod
68 cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
69 cp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl /kernel/strmod/$(LP64DIR)
70 if grep clone:ppp /etc/minor_perm; then :; else \
71 echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
72 /usr/sbin/rem_drv ppp 2>/dev/null || true
73 /usr/sbin/modunload -i 0
76 SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
77 ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
78 ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
87 $(MAKE) -f $(STD_MAKE) clean
88 rm -f $(LP64DIR)/ppp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl $(LP64DIR)/*.o $(LP64DIR)/*~ $(LP64DIR)/core