File: Makefile

package info (click to toggle)
flip 1.20-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 196 kB
  • sloc: ansic: 1,186; cpp: 172; makefile: 124; sh: 61
file content (100 lines) | stat: -rw-r--r-- 2,668 bytes parent folder | download | duplicates (3)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Makefile for flip for **IX.  ::[[ @(#) makefile.nix 1.4 89/07/04 12:00:02 ]]::

# The contents of this makefile are hereby released to the public domain.
#                               -- Rahul Dhesi 1989/06/19

PACKAGE = flip
VERSION = 1.20
distdir = $(PACKAGE)-$(VERSION)
srcdir = .
TAR = tar
GZIP_ENV = --best
DISTFILES=FILES INSTALL.DOC MAKEFILE.TCC test-flip	\
 MESSAGE Makefile TURBOC.C TURBOC.CFG flip.1 flip.c flip.h getopt.c ChangeLog

# Before use make sure this file is called "makefile".  (Rename it if
# necessary.)  Then invoke as follows:

# To build on a modern Unix system with a standard C compiler:
#   make "CFLAGS= -DBSD -DIX -DSTDINCLUDE" flip
# Otherwise:
#   "make sys_v"        makes executable flip for System V Release 2
#   "make bsd"          makes executable flip for 4.3BSD

#   "make install"      moves flip into BINDIR, copies flip.1 into MANDIR
#   "make clean"        deletes object and executable files

# Where to install executable and manual files on "make install".  The trailing
# "/." forces an error message if the destination directory doesn't exist.
BINDIR = /usr/local/bin/.
MANDIR = /usr/man/man1/.

# CC is compiler, LD is loader (may be same as compiler), CFLAGS are flags
# for compiler, LDFLAGS are flags for loader, CFMORE are additional
# (relatively unchanging) flags for compiler

CC = cc
# CFLAGS =
CFMORE = -c -DNDEBUG -O -DVERSION=\"$(VERSION)\"
LD = cc
# LDFLAGS = -o flip

# If your system does not supply getopt as a library function,
# add getopt.o to the RHS list on the next line and uncomment the
# two nonblank lines after that.
OBJS = flip.o

#getopt.o: getopt.c flip.h
#	$(CC) $(CFLAGS) $(CFMORE) $*.c

all: flip

nothing:
	@echo \
	'Please type "make sys_v", "make bsd", "make uport", or "make ultrix"'

sys_v:
	make "CFLAGS=-DSYS_V -DIX" flip

uport:
	make "CFLAGS=-DSYS_V -Ml -DIX" "LDFLAGS=-Ml -o flip" flip

bsd:
	make "CFLAGS=-DBSD -DIX" flip

ultrix:
	make "CFLAGS=-DBSD -DULTRIX_BUG" flip

flip: $(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) -o flip

flip.o: flip.c flip.h
	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFMORE) $*.c

clean:
	rm -f *.o core flip

install:
	mv flip $(BINDIR)
	cp flip.1 $(MANDIR)

check:
	bash test-flip

dist: $(DISTFILES)
	-rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	@for file in $(DISTFILES); do \
	  d=$(srcdir); \
	  if test -d $$d/$$file; then \
	    cp -pr $$d/$$file $(distdir)/$$file; \
	  else \
	    test -f $(distdir)/$$file \
	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
	    || cp -p $$d/$$file $(distdir)/$$file || :; \
	  fi; \
	done
	-chmod -R a+r $(distdir)
	GZIP=$(GZIP_ENV) $(TAR) -chozf $(distdir).tar.gz $(distdir)
	-rm -rf $(distdir)