Cleaned up Makefiles, and added lint target for both 32- and 64-bits.
authorAdi Masputra <adi.masputra@sun.com>
Wed, 15 Sep 1999 22:10:16 +0000 (22:10 +0000)
committerAdi Masputra <adi.masputra@sun.com>
Wed, 15 Sep 1999 22:10:16 +0000 (22:10 +0000)
svr4/Makedefs.sol2 [new file with mode: 0644]
svr4/Makefile.sol2
svr4/Makefile.sol2-64

diff --git a/svr4/Makedefs.sol2 b/svr4/Makedefs.sol2
new file mode 100644 (file)
index 0000000..7cce080
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Generic make definitions for Solaris 2
+#
+# $Id: Makedefs.sol2,v 1.1 1999/09/15 22:10:16 masputra Exp $
+#
+
+include Makedefs
+
+CPPFLAGS       = -D_KERNEL -DSVR4 -DSOL2 -I../include -DPRIOQ -DDEBUG
+CFLAGS         = $(CPPFLAGS) $(COPTS)
+
+# lint-specific variables
+LINT            = lint
+LINT32OPT       =
+LINT64OPT       = -Xarch=v9 -errchk=longptr64
+
+LINTTAGS_32     =
+LINTTAGS_32     += -erroff=E_BAD_PTR_CAST_ALIGN
+LINTTAGS_32     += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+LINTTAGS_32     += -erroff=E_SUSPICIOUS_COMPARISON
+LINTTAGS_32     += -erroff=E_CAST_UINT_TO_SIGNED_INT
+LINTTAGS_32     += -erroff=E_PASS_UINT_TO_SIGNED_INT
+LINTTAGS_32     += -erroff=E_INVALID_ANNOTATION_NAME
+LINTTAGS_32     += -erroff=E_FUNC_ARG_UNUSED
+
+# Selectively disable certain noisy lint errors
+LENIENT_LINTTAGS =
+LENIENT_LINTTAGS += -erroff=E_CAST_INT_TO_SMALL_INT
+LENIENT_LINTTAGS += -erroff=E_CAST_INT_CONST_TO_SMALL_INT
+LENIENT_LINTTAGS += -erroff=E_CAST_TO_PTR_FROM_INT
+LENIENT_LINTTAGS += -erroff=E_ASSIGN_INT_TO_SMALL_INT
+LENIENT_LINTTAGS += -erroff=E_ASSIGN_INT_FROM_BIG_CONST
+LENIENT_LINTTAGS += -erroff=E_CONST_PROMOTED_UNSIGNED_LL
+LENIENT_LINTTAGS += -erroff=E_CONST_PROMOTED_LONG_LONG
+LENIENT_LINTTAGS += -erroff=E_CONST_TRUNCATED_BY_ASSIGN
+LENIENT_LINTTAGS += -erroff=E_PASS_INT_FROM_BIG_CONST
+LENIENT_LINTTAGS += -erroff=E_COMP_INT_WITH_LARGE_INT
+LENIENT_LINTTAGS += -erroff=E_ASSIGN_UINT_TO_SIGNED_INT
+# These last three are still noisy but a bit more useful.
+# They shouldn't be used on new code.
+LENIENT_LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
+LENIENT_LINTTAGS += -erroff=E_PASS_INT_TO_SMALL_INT
+LENIENT_LINTTAGS += -erroff=E_PTR_CONV_LOSES_BITS
+
+LINTTAGS_64     = $(LINTTAGS_32)
+# comment out next line to turn on pedantic 64-bit error checking
+LINTTAGS_64     += $(LENIENT_LINTTAGS)
+
+LINTFLAGS64     = -Xa -nsxmuF -errtags=yes $(LINT64OPT) $(LINTTAGS_64)
+LINT64.c        = $(LINT) -c $(LINTFLAGS64) $(CPPFLAGS)
+
+LINTFLAGS32     = -Xa -nsxmuF -errtags=yes $(LINT32OPT) $(LINTTAGS_32)
+LINT32.c        = $(LINT) -c $(LINTFLAGS32) $(CPPFLAGS)
+
index 01a017f176c45503d027c25a7a976990bd2c1b56..ed148c3936dd4737d8a50571bb59303530c1ddd9 100644 (file)
@@ -1,12 +1,10 @@
 #
 # Makefile for STREAMS modules for Solaris 2.
 #
-# $Id: Makefile.sol2,v 1.14 1999/09/13 20:57:54 masputra Exp $
+# $Id: Makefile.sol2,v 1.15 1999/09/15 22:10:16 masputra Exp $
 #
 
-include Makedefs
-
-CFLAGS= -D_KERNEL -DSVR4 -DSOL2 -I../include -DPRIOQ -DDEBUG $(COPTS)
+include Makedefs.sol2
 
 COMP_OBJS = ppp_comp.o bsd-comp.o deflate.o zlib.o vjcompress.o \
        ppp_comp_mod.o
@@ -48,5 +46,12 @@ install: all
        /usr/sbin/rem_drv ppp 2>/dev/null || true
        /usr/sbin/add_drv ppp
 
+SRCS   = ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
+       ../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
+       ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
+
+lint:
+       $(LINT32.c) $(SRCS)
+
 clean:
        rm -f ppp ppp_comp ppp_ahdl *.o *~ core
index 64cc9b75213edc46850ea122e6edaed246422cc7..d73b0b01aa5fe1204499d17d858469ef8a84c58f 100644 (file)
@@ -1,19 +1,23 @@
 #
 # Makefile for 64-bit STREAMS modules for Solaris 2.
 #
-# $Id: Makefile.sol2-64,v 1.1 1999/09/13 20:57:54 masputra Exp $
+# $Id: Makefile.sol2-64,v 1.2 1999/09/15 22:10:16 masputra Exp $
 #
 
-include Makedefs
+include Makedefs.sol2
 
-COPTS += -xarch=v9
-LP64DIR = sparcv9
-STD_MAKE = Makefile.sol2
+# Sun's cc flag for LP64 compilation / linkage
+COPTS          += -xarch=v9
 
-CFLAGS= -D_KERNEL -DSVR4 -DSOL2 -I../include -DPRIOQ -DDEBUG $(COPTS)
+# subdirectory where 64-bit objects / binaries will be placed
+LP64DIR                = sparcv9
 
-COMP_OBJS =    $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o $(LP64DIR)/deflate.o        \
-               $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o $(LP64DIR)/ppp_comp_mod.o
+# Name of legacy Makefile (for 32-bit binaries)
+STD_MAKE       = Makefile.sol2
+
+COMP_OBJS      = $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o \
+               $(LP64DIR)/deflate.o $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o \
+               $(LP64DIR)/ppp_comp_mod.o
 
 all:   std_objs $(LP64DIR) ppp ppp_ahdl ppp_comp
 
@@ -66,6 +70,16 @@ install:
        /usr/sbin/rem_drv ppp 2>/dev/null || true
        /usr/sbin/add_drv ppp
 
+SRCS   = ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
+       ../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
+       ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
+
+lint:
+       $(LINT64.c) $(SRCS)
+
+lint-32:
+       $(LINT32.c) $(SRCS)
+
 clean:
        $(MAKE) -f $(STD_MAKE) clean
        rm -f $(LP64DIR)/ppp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl $(LP64DIR)/*.o $(LP64DIR)/*~ $(LP64DIR)/core