heirloom-ed

view makefile @ 4:4165f1b57d18

Become SUSv3 compatible and thus remove own regexp code The Heirloom tools can be compiled to comply to several standards. This version does not need this flexibility. We can omit the regexp code and use the system's, by using the SU3 variant of ed. This is the latest of the supported standards.
author markus schnalke <meillo@marmaro.de>
date Mon, 13 Apr 2015 17:26:51 +0200
parents 1493bea5ac22
children
line source
1 #
2 # Root directory. Mainly useful for package building; leave empty for
3 # normal installation.
4 #
5 ROOT =
7 PREFIX = /usr/local
9 #
10 # Location for binaries.
11 #
12 BINDIR = $(PREFIX)/bin
14 #
15 # Location for manual pages (with man1, man1b ... man8 below).
16 #
17 MANDIR = $(PREFIX)/share/man
19 #
20 # Compiler and linker flags.
21 #
23 #CC = $(HOME)/src/diet gcc
24 CC = cc
26 LD = $(CC)
27 #LDFLAGS = --static
28 LDFLAGS =
30 #
31 # Flags for the C preprocessor.
32 # On Linux with glibc or uClibc, add -D_GNU_SOURCE.
33 # On Solaris, -D__EXTENSIONS__ should be added.
34 # On HP-UX, -D_INCLUDE__STDC_A1_SOURCE must be added.
35 # On AIX, -D_TPARM_COMPAT must be added.
36 # On AIX, -D_MTEXTEND_H should be added if mtextend.h is not found.
37 # On NetBSD, add -DUSE_TERMCAP.
38 #
39 CPPFLAGS = -D_GNU_SOURCE
41 #
42 # CFLAGS makes it possible to give special
43 # compiler flags for objects where speed is critical. There is no other
44 # purpose with this so setting all to -O will work too.
45 #
46 WARN =
47 CFLAGS = -O -fomit-frame-pointer $(WARN)
50 #
51 # Whether to use the supplied widechar emulation library. This should
52 # only be enabled if the system lacks appropriate widechar support.
53 # It is currently needed on
54 # - Linux/diet libc
55 # - FreeBSD 4
56 # - NetBSD 1.x, because it lacks wctype_t/wctrans_t etc. in wctype.h.
57 # - OpenBSD
58 #
59 #IWCHAR = -I../libwchar
60 #LWCHAR = -L../libwchar -lwchar
63 #
64 # Binaries are stripped with this command after installation.
65 #
66 STRIP = strip -s -R .comment -R .note
68 #
69 # This is the shell used for the compilation phase, the execution of most
70 # installed scripts, and the shell escapes in the traditional command
71 # versions. It needs not conform to POSIX. The system shell should work
72 # fine; for maximum compatibility with traditional tools, the Heirloom
73 # Bourne shell is recommended. It then must obviously be compiled and
74 # installed first.
75 #
76 SHELL = /bin/sh
78 #
79 # Don't change the rest of this file unless you really know what you are
80 # doing.
81 #
83 ########################################################################
84 ########################################################################
85 ########################################################################
86 ########################################################################
87 ########################################################################
89 all: ed
91 ed: ed.o sigset.o sigrelse.o
92 $(LD) $(LDFLAGS) ed.o -o ed
94 ed.o: ed.c
95 $(CC) $(CFLAGS) $(CPPFLAGS) $(IWCHAR) -DSHELL='"$(SHELL)"' -I. -c ed.c
97 sigset.o: sigset.c sigset.h
98 $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c sigset.c
100 sigrelse.o: sigrelse.c sigset.h
101 $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c sigrelse.c
104 install: all
105 mkdir -p $(ROOT)$(BINDIR)
106 cp ed $(ROOT)$(BINDIR)/ed
107 chmod 755 $(ROOT)$(BINDIR)/ed
108 $(STRIP) $(ROOT)$(BINDIR)/ed
109 mkdir -p $(ROOT)$(MANDIR)/man1
110 cp ed.1 $(ROOT)$(MANDIR)/man1/ed.1
111 chmod 644 $(ROOT)$(MANDIR)/man1/ed.1
113 clean:
114 rm -f ed.o sigset.o sigrelse.o core log *~
116 mrproper: clean
117 rm -f ed