1 # $NetBSD: Makefile,v 1.31 2008/10/25 22:35:37 apb Exp $
2 # Copyright (c) 1992,1991 Carnegie Mellon University
5 # Permission to use, copy, modify and distribute this software and its
6 # documentation is hereby granted, provided that both the copyright
7 # notice and this permission notice appear in all copies of the
8 # software, derivative works or modified versions, and any portions
9 # thereof, and that both notices appear in supporting documentation.
11 # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
12 # CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
13 # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 # Carnegie Mellon requests users of this software to return to
17 # Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
18 # School of Computer Science
19 # Carnegie Mellon University
20 # Pittsburgh PA 15213-3890
22 # any improvements or extensions that they make and grant Carnegie the rights
23 # to redistribute these changes.
24 ######################################################################
25 # Makefile to build sup (the client side), supfilesrv (the repository
26 # side, and supscan (used by the repository. If you only want to sup
27 # files from CMU, just build sup.
28 # The header files: c.h and libc.h are only
29 # necessary if you are compiling on a non-Mach system. Likewise the
30 # files in libextra.a are normally found in libcs.a on a Mach system.
31 # DOPRINT_VA is used by vprintf.c and should be defined if your version
32 # of libc/doprnt.c defines the routine _doprnt_va. If it defines _doprnt
33 # instead, leave DORPINT_VA undefined.
34 ######################################################################
36 # If you need to build a sup for export outside of North America use
37 # "make EXPORTABLE_SYSTEM=true"
38 # this will remove (not use) any vestiges of crypt code that is present
41 # If you have crypt/crypt.c and /usr/lib/libcrypt.a, you will be building
42 # a system that uses the SUP crypt mechanism by default.
44 # If building on non 4.4BSD systems, you'll need the vis(3) and the daemon(3)
45 # functions from libc and libutil
52 SITE1
!= uname
-s | tr
'[a-z]' '[A-Z]' \
54 SITE2
= $(shell uname
-s | tr
'[a-z]' '[A-Z]' \
56 SITE
= ${SITE1}${SITE2}
59 LINUX_DEFINES
= -UMACH
-DVAR_TMP
-DHAS_DAEMON
-DHAS_POSIX_DIR \
61 NETBSD_DEFINES
= -UMACH
-DVAR_TMP
-DHAS_DAEMON
-DHAS_POSIX_DIR \
62 -DHAS_FPARSELN
-DHAS_FGETLN
-DHAS_VIS
63 FREEBSD_DEFINES
= -UMACH
-DVAR_TMP
-DHAS_DAEMON
-DHAS_POSIX_DIR \
64 -DHAS_FPARSELN
-DHAS_FGETLN
-DHAS_VIS
65 SOLARIS_DEFINES
= -UMACH
-DVAR_TMP
-DHAS_POSIX_DIR
-DNEED_VSNPRINTF
66 AFS_DEFINES
= -DAFS
-I
/usr
/afsws
/include
67 OSF_DEFINES
= -UMACH
-DOSF
-D_BSD
-noshrlib
-g
-DNEED_VSNPRINTF \
69 SUNOS_DEFINES
= -UMACH
-D_BSD
-DNEED_VSNPRINTF
-DVAR_TMP \
70 -DHAS_POSIX_DIR
-DHAS_DAEMON
-DNEED_DAEMON
71 CYGWIN_DEFINES
= -UMACH
-DVAR_TMP
-DHAS_POSIX_DIR
72 CMUCS_DEFINES
= -DMACH
-DDOPRINT_VA
-DNEED_VPRINTF
73 NON_MACH_DEFINES
= -UMACH
76 #INSTALLATION PARAMETERS
78 NETBSD_BINDIR
= ${PREFIX}/sbin
79 NETBSD_MAN1
= ${PREFIX}/man
/man1
80 NETBSD_MAN8
= ${PREFIX}/man
/man8
82 CFLAGS
= ${DEFS} -O
-I.
-g
84 SUPCL
= supcmain.o supcvers.o supcparse.o supcname.o \
86 SUPS
= scm.o scmio.o stree.o log.o supmsg.o netcrypt.o
87 EXTRA
= atoo.o expand.o ffilecopy.o filecopy.o \
88 nxtarg.o path.o quit.o read_line.o run.o estrdup.o \
89 skipto.o vprintf.o setproctitle.o
92 PROGRAMS
= sup supscan supfilesrv
96 AFS_LIBPATH
= /usr
/afs
/lib
97 AFS_LIBS
= -L
${AFS_LIBPATH}/afs
-lkauth
-lprot
-L
${AFS_LIBPATH} -lubik
-lauth
-lrxkad
-lsys
-ldes
-lrx
-llwp
-lcmd
-lcom_err
-lc
${AFS_LIBPATH}/afs
/util.a
100 FREEBSD_LIBS
= -lcrypt
101 DRAGONFLY_LIBS
= -lcrypt
103 CYGWIN_LIBS
= -lcrypt
106 EXTRALIBS
= libextra.a
107 sup_OFILES
= ${SUPCL} ${SUPS}
108 supfilesrv_OFILES
= supfilesrv.o scan.o
${SUPS}
109 supfilesrv_LIBS
= libextra.a
110 supscan_OFILES
= supscan.o stree.o scan.o
111 SOLARIS_LIBS
= -lsocket
-lnsl
114 DEFS
= -UCMUCS
-UCMU
${${SITE}_DEFINES
}
115 #DEFS += -DDEFDIR=\"${PREFIX}/libdata/sup\"
116 #DEFS += -DEE_XXX -DDEFSCAN=\"/var/\" -DDEFUSER=\"nobody\"
121 sup
: ${sup_OFILES} ${LIBS}
122 ${CC} ${CFLAGS} -o sup
${sup_OFILES} ${LIBS} ${${SITE}_LIBS
}
124 supfilesrv
: ${supfilesrv_OFILES} ${supfilesrv_LIBS}
125 ${CC} ${CFLAGS} -o supfilesrv
${supfilesrv_OFILES} ${supfilesrv_LIBS} ${LIBS} ${${SITE}_LIBS
}
127 supscan
: ${supscan_OFILES} ${LIBS}
128 ${CC} ${CFLAGS} -o supscan
${supscan_OFILES} ${LIBS} ${${SITE}_LIBS
}
134 clean cleandir
distclean:
135 rm -f
${PROGRAMS} libextra.a netcrypt.c
*.o core a.out
138 install -cs
-m
555 -o bin
-g bin
${PROGRAMS} ${NETBSD_BINDIR}
139 install -c
-m
444 -o bin
-g bin
${MAN1} ${NETBSD_MAN1}
140 install -c
-m
444 -o bin
-g bin
${MAN8} ${NETBSD_MAN8}
143 @echo
"[ Using netcryptvoid.c ]"
144 cp netcryptvoid.c netcrypt.c
147 mkdir
${TARDIR} ${TARDIR}/sys
148 cp
-p
*.
[ch18
] Makefile
${TARDIR}
149 cp
-p sys
/*.h
${TARDIR}/sys
150 tar -czf
${TARDIR}.
tar.gz
${TARDIR}
153 read_line.o
: supextern.h
156 scmio.o
: sup.h supmsg.h
158 supcmain.o
: sup.h supmsg.h supcdefs.h
159 supcmeat.o
: sup.h supmsg.h supcdefs.h
160 supcmisc.o
: sup.h supmsg.h supcdefs.h
161 supcname.o
: sup.h supmsg.h supcdefs.h
162 supcparse.o
: sup.h supmsg.h supcdefs.h
163 supfilesrv.o
: sup.h supmsg.h
164 supmsg.o
: sup.h supmsg.h
166 netcryptvoid.o
: sup.h supmsg.h
167 netcrypt.o
: sup.h supmsg.h