source: trunk/athena/bin/machtype/Imakefile @ 12361

Revision 12361, 1.1 KB checked in by ghudson, 25 years ago (diff)
From source-sipb: add support for machtype scripts and add a machtype script for Linux.
Line 
1/*
2 * $Id: Imakefile,v 1.22 1999-01-25 21:29:20 ghudson Exp $
3 */
4
5#ifdef SOLARIS
6LIBS=-lkvm -ladm
7#endif
8
9#ifdef sgi
10LIBS=-lelf
11#endif
12
13#if defined(__NetBSD__) || defined(linux)
14#define SCRIPT
15#endif
16
17#if defined(SOLARIS) || defined(sgi)
18INSTALLFLAGS = -m 2755 -o root -g sys
19#endif
20
21NAME=${HOSTTYPE}
22OSNAME=`uname -s`
23OSVERS=`uname -r`
24
25#ifdef SCRIPT
26
27all:: machtype
28
29clean::
30        rm -f machtype
31
32machtype: ${ATHVERS} machtype_${NAME}.sh
33        rm -f $@
34        . ${ATHVERS}; \
35                sed -e "s/@ATHMAJV@/$$major/" -e "s/@ATHMINV@/$$minor/" \
36                        -e 's/@ATHSYSCOMPAT@/${ATHENA_SYS_COMPAT}/' \
37                        -e 's/@ATHSYS@/${ATHENA_SYS}/' machtype_${NAME}.sh > $@
38        chmod a+x $@
39
40install_program(machtype,,${ATHRBINDIR})
41
42#else
43
44machtype.o:     ${ATHVERS} machtype.c
45        $(RM) $@
46        . $(ATHVERS); \
47        $(CC) -c $(CFLAGS) -DATHMAJV=\"$$major\" -DATHMINV=\"$$minor\" \
48        -DATHSYS=\"${ATHENA_SYS}\" -DATHSYSCOMPAT=\"${ATHENA_SYS_COMPAT}\" \
49        -DOSNAME=\"${OSNAME}\" -DOSVERS=\"${OSVERS}\" $*.c
50
51build_program(machtype, machtype.o machtype_${NAME}.o,,${LIBS})
52install_program(machtype,${INSTALLFLAGS},${ATHRBINDIR})
53
54#endif
55
56install_man(machtype.1,machtype.1)
Note: See TracBrowser for help on using the repository browser.