2 # Makefile for 64-bit STREAMS modules for Solaris 2 on x64
4 # $Id: Makefile.sol2-64x,v 1.1 2005/06/26 23:53:17 carlsonj Exp $
9 # Sun's cc flag for LP64 compilation / linkage
10 COPTS += -errwarn -xtarget=opteron -xarch=amd64 -xmodel=kernel \
11 -Ui386 -U__i386 -D__amd64 -xO2
13 # subdirectory where 64-bit objects / binaries will be placed
16 # Name of legacy Makefile (for 32-bit binaries)
17 STD_MAKE = Makefile.sol2
19 COMP_OBJS = $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o \
20 $(LP64DIR)/deflate.o $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o \
21 $(LP64DIR)/ppp_comp_mod.o
23 all: std_objs $(LP64DIR) ppp ppp_ahdl ppp_comp
26 $(MAKE) -f $(STD_MAKE) all
28 ppp: $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
29 $(LD) -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
30 chmod +x $(LP64DIR)/$@
32 ppp_ahdl: $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
33 $(LD) -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp_ahdlc.o \
34 $(LP64DIR)/ppp_ahdlc_mod.o
35 chmod +x $(LP64DIR)/$@
37 ppp_comp: $(COMP_OBJS)
38 $(LD) -r -o $(LP64DIR)/$@ $(COMP_OBJS)
39 chmod +x $(LP64DIR)/$@
41 $(LP64DIR)/bsd-comp.o: ../modules/bsd-comp.c
42 $(CC) $(CFLAGS) -c $? -o $@
43 $(LP64DIR)/deflate.o: ../modules/deflate.c
44 $(CC) $(CFLAGS) -c $? -o $@
45 $(LP64DIR)/ppp.o: ppp.c
46 $(CC) $(CFLAGS) -c $? -o $@
47 $(LP64DIR)/ppp_mod.o: ppp_mod.c
48 $(CC) $(CFLAGS) -c $? -o $@
49 $(LP64DIR)/ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
50 $(CC) $(CFLAGS) -c $? -o $@
51 $(LP64DIR)/ppp_ahdlc.o: ppp_ahdlc.c
52 $(CC) $(CFLAGS) -c $? -o $@
53 $(LP64DIR)/ppp_comp.o: ppp_comp.c
54 $(CC) $(CFLAGS) -c $? -o $@
55 $(LP64DIR)/ppp_comp_mod.o: ppp_comp_mod.c
56 $(CC) $(CFLAGS) -c $? -o $@
57 $(LP64DIR)/vjcompress.o: ../modules/vjcompress.c
58 $(CC) $(CFLAGS) -c $? -o $@
59 $(LP64DIR)/zlib.o: ../common/zlib.c
60 $(CC) $(CFLAGS) -c $? -o $@
66 /usr/sbin/modunload -i 0
67 cp ppp ppp.conf /kernel/drv
68 cp ppp_comp ppp_ahdl /kernel/strmod
69 cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
70 cp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl /kernel/strmod/$(LP64DIR)
71 if grep clone:ppp /etc/minor_perm; then :; else \
72 echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
73 /usr/sbin/rem_drv ppp 2>/dev/null || true
74 /usr/sbin/modunload -i 0
77 SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
78 ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
79 ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
88 $(MAKE) -f $(STD_MAKE) clean
89 rm -f $(LP64DIR)/ppp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl $(LP64DIR)/*.o $(LP64DIR)/*~ $(LP64DIR)/core