File: Makefile

package info (click to toggle)
buffer 1.19-12
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 500 kB
  • sloc: ansic: 8,475; makefile: 124; sh: 35
file content (49 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download
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
# Make the buffer program

# You might need to add the following to CGFLAGS:
#
# Add -DSYS5 for A System 5 (USG) version of Unix
#   You should also add -DSYS5 for Ultrix, AIX, and Solaris.
# Add -DDEF_SHMEM=n if you can only have n bytes of shared memory
#   (eg: -DDEF_SHMEM=524288 if you can only have half a meg.)
# Add -DAMPEX to change the default settings suitable for the high capacity
#   Ampex drives, such as the DST 310.

CC=gcc
CFLAGS=-Wall

# Where to install buffer and its manual pages
INSTBIN=/usr/local/bin
INSTMAN=/usr/man/manl
# The manual page section (normally l or 1)
S=l

RM=/bin/rm
ALL=README buffer.man Makefile buffer.c sem.c sem.h COPYING

all: buffer

buffer: buffer.o sem.o
	$(CC) -o buffer $(CFLAGS) $(LDFLAGS) buffer.o sem.o

clean:
	$(RM) -f *.o core buffer .merrs

install: buffer
	rm -f $(INSTBIN)/buffer
	cp buffer $(INSTBIN)/buffer
	chmod 111 $(INSTBIN)/buffer
	rm -f $(INSTMAN)/buffer.$S
	cp buffer.man $(INSTMAN)/buffer.$S
	chmod 444 $(INSTMAN)/buffer.$S

buffer.tar: $(ALL)
	$(RM) -f buffer.tar
	tar cvf buffer.tar $(ALL)

buffer.shar: $(ALL)
	$(RM) -f buffer.shar
	shar $(ALL) > buffer.shar

check: buffer
	bash check.bash