File: Make.aix

package info (click to toggle)
9term 1.6.6-5
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 2,340 kB
  • ctags: 2,035
  • sloc: ansic: 17,308; makefile: 220; sh: 178
file content (84 lines) | stat: -rw-r--r-- 2,284 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#	Copyright (c) 1992 AT&T - All rights reserved.
#
#	Prototype Aix Makefile for sam
#	Courtesy of Dan McDonald
#
#	Define operating system type: -DAIX
#
#	Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
#	if your compiler supports posix-compatible compilation
#
OS=-DAIX -D_POSIX_SOURCE -D_ANSI_C_SOURCE

#	add -Iincludedir for any include directories that need to be searched
#	for posix header files (for UMIPS, add -I/usr/include/posix)
INCS=-I../include

#	Set the name of the environment variable containing the user's home directory
HOMEDIR=HOME

#	RSAMNAME and TERMNAME contain the names of the files containing the
#	sam and samterm executables, respectively.  SAMDIR is the directory
#	where sam is to be installed.  SAMSAVEDIR is the name of the directory
#	where the samsave file restoration script is stored.
RSAMNAME=sam
TERMNAME=/usr/local/bin/samterm
SAMDIR=/usr/local/bin
SAMSAVEDIR=/usr/local/bin

#	Set TMP to a good place for tmp files (with lots of room)
TMP=/usr/tmp

#	Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
#	of its executable
SHELLNAME=sh
SHELLPATH=/bin/sh

#	Set RXNAME and RXPATHNAME to the name of the remote execution command
#	and the pathname of its executable
RXNAME=rsh
RXPATHNAME=/usr/ucb/rsh

SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave

CFLAGS=$(OS) -D_LIBXG_EXTENSION $(INCS)

SYSFLAGS=  -DHOMEDIR=\"$(HOMEDIR)\" -DRSAMNAME=\"$(RSAMNAME)\" \
		-DTERMNAME=\"$(TERMNAME)\" -DTMP=\"$(TMP)\" \
		-DSHELLNAME=\"$(SHELLNAME)\" -DSHELLPATH=\"$(SHELLPATH)\" \
		-DRXNAME=\"$(RXNAME)\" -DRXPATHNAME=\"$(RXPATHNAME)\" \
		-DSAMSAVE=\"$(SAMSAVE)\"

LIB=../libframe/libframe.a ../libXg/libXg.a

### AIX NOTE: "xlc" is the ANSI C compiler.

CC=xlc

OBJ=sam.o address.o buffer.o cmd.o disc.o error.o file.o io.o \
	list.o mesg.o moveto.o multi.o rasp.o regexp.o shell.o \
	string.o sys.o unix.o xec.o

all:    sam

sam:	$(OBJ) $(LIB)
	$(CC) -o sam $(OBJ) $(LIB)

clean:
	rm -f *.o core

nuke:	clean
	rm -f sam

install:	sam
	cp sam $(SAMDIR)/$(RSAMNAME)
	cp samsave $(SAMSAVEDIR)/samsave
	chmod +x $(SAMSAVEDIR)/samsave

$(OBJ):	sam.h ../include/u.h ../include/libc.h errors.h mesg.h

cmd.o:	parse.h
xec.o:	parse.h

unix.o:	sam.h ../include/u.h ../include/libc.h errors.h mesg.h
	$(CC) -c $(CFLAGS) $(SYSFLAGS) unix.c