Revision 12361,
1.1 KB
checked in by ghudson, 26 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 |
---|
6 | LIBS=-lkvm -ladm |
---|
7 | #endif |
---|
8 | |
---|
9 | #ifdef sgi |
---|
10 | LIBS=-lelf |
---|
11 | #endif |
---|
12 | |
---|
13 | #if defined(__NetBSD__) || defined(linux) |
---|
14 | #define SCRIPT |
---|
15 | #endif |
---|
16 | |
---|
17 | #if defined(SOLARIS) || defined(sgi) |
---|
18 | INSTALLFLAGS = -m 2755 -o root -g sys |
---|
19 | #endif |
---|
20 | |
---|
21 | NAME=${HOSTTYPE} |
---|
22 | OSNAME=`uname -s` |
---|
23 | OSVERS=`uname -r` |
---|
24 | |
---|
25 | #ifdef SCRIPT |
---|
26 | |
---|
27 | all:: machtype |
---|
28 | |
---|
29 | clean:: |
---|
30 | rm -f machtype |
---|
31 | |
---|
32 | machtype: ${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 | |
---|
40 | install_program(machtype,,${ATHRBINDIR}) |
---|
41 | |
---|
42 | #else |
---|
43 | |
---|
44 | machtype.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 | |
---|
51 | build_program(machtype, machtype.o machtype_${NAME}.o,,${LIBS}) |
---|
52 | install_program(machtype,${INSTALLFLAGS},${ATHRBINDIR}) |
---|
53 | |
---|
54 | #endif |
---|
55 | |
---|
56 | install_man(machtype.1,machtype.1) |
---|
Note: See
TracBrowser
for help on using the repository browser.