home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
sysinfo-1.0
/
part01
/
Mkfile.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-10
|
3KB
|
132 lines
#
# $Header: /src/common/usc/bin/sysinfo/RCS/Mkfile.cpp,v 1.24 1992/06/01 22:38:55 mcooper Exp $
#
#define USE_KARCH
#include "/usr/usc/include/mk/all.h"
KVM = /usr/kvm/lsd
BIN = /usr/lsd/bin
MAN = /usr/usc/man/man1
#if defined(sun)
LIBKVM = -lkvm
#else
LIBKVM =
#endif
#if defined(sun) && defined(OSVERSION) && OSVERSION == 40
CC = /usr/5bin/cc
LIBS = /usr/5lib/libc.a -L/usr/usc/lib -lgen $LIBKVM
#else
LIBS = -L/usr/usc/lib -lgen $LIBKVM
#endif
#if defined(alliant)
CC = cc
LIBS = /usr/usc/lib/libgen.a -lcommon $LIBKVM
#endif
#if defined(NeXT)
CC = gcc
#endif
NETIFOBJS = ${O}netif.o ${O}info-netif.o
MACHOBJS = ${O}os-"mach".o ${O}info-"mach".o
#ifdef sun
OSFILES = ${O}os-"sunos".o ${O}info-"sunos".o $NETIFOBJS
OSDEFS = -D`/bin/arch -k`
#endif
#ifdef ultrix
OSFILES = ${O}os-"ultrix".o ${O}info-"ultrix".o $NETIFOBJS
#endif
#ifdef NeXT
OSFILES = ${O}os-"next".o ${O}info-"next".o $MACHOBJS $NETIFOBJS
#endif
#ifdef alliant
OSFILES = ${O}os-"alliant.o" ${O}info-"alliant".o
#endif
#ifdef _AIX
OSFILES = ${O}os-"aix.o" ${O}info-"aix".o
#endif
/* Should use something besides hp300 */
#ifdef hp300
OSFILES = ${O}os-"bsd43.o" ${O}info-"bsd43".o
#endif
OPT = -g
#ifdef sun
INCLUDES = -I/usr/usc/include
#else
INCLUDES = -I/usr/usc/include -I.
#endif
DEFINES = -DOPTION_COMPAT $OSDEFS
CFLAGS = $OPT $INCLUDES $DEFINES
NPROC = 4
BASE = sysinfo
PROG = ${O}sysinfo
OBJS = ${O}sysinfo.o ${O}devices.o ${O}memory.o ${O}kernel.o \
${O}run.o ${O}KVM.o ${O}kvm.o ${O}strdup.o $OSFILES
SRCS = "`echo $OBJS | sed -e "s;$O;;g" -e 's;\.o;.c;g'`"
ALLSRCS = sysinfo.c devices.c memory.c kernel.c\
run.c KVM.c kvm.c kvm.h patchlevel.h \
strcasecmp.c strdup.c strerror.c \
options.c options.h \
system.h defs.h \
netif.c info-netif.c \
os-mach.c info-mach.c \
os-sunos.c info-sunos.c \
os-ultrix.c info-ultrix.c info-ultrix.h \
os-next.c info-next.c \
os-alliant.c info-alliant.c \
os-bsd43.c info-bsd43.c \
os-aix.c info-aix.c
all: $PROG
$PROG: $OBJS $LIBS
$CC $CFLAGS -o ${target} $OBJS $LIBS
#if defined(sun)
install: ${PROG}
install -c -m 4555 -o root -g wheel $PROG $KVM/$BASE
(cd $BIN && rm -f $BASE && ln -s $KVM/$BASE $BASE)
#else
install: ${PROG}
install -c -m 4555 -o root -g wheel $PROG $BIN/$BASE
#endif /* sun */
install.man: ${BASE}.man
install -c -m 444 -o bin -g bin ${BASE}.man $MAN/$BASE.1
install.compat:
install -c -m 555 -o bin -g bin cpumodel.sh /usr/lsd/etc/cpumodel
rm -f $MAN/${BASE}.8 $MAN/cpumodel.1
(cd /usr/usc/bin; rm -f sysinfo; ln -s ${BIN}/sysinfo)
#
# Centerline stuff
#
#ifdef sun /* Some platforms don't like the #load below */
cc_src:
#load $CFLAGS $SRCS $LIBS $LIBKVM
cc_obj:
#load $CFLAGS $OBJS $LIBS $LIBKVM
#endif
clean:
rm -f ${PROG} *~ *% \#* core a.out ${O}*.o
$OBJS: system.h defs.h
DISTFILES = README sysinfo.man Makefile $ALLSRCS options.3 Mkfile.cpp
sysinfo.tar: $DISTFILES
rm -f $target
tar chf $target $DISTFILES
sysinfo.shar: $DISTFILES
rm -f $target
shar $DISTFILES > $target