heirloom-ed

view makefile @ 3:ac52712b2b5e

Remove the fspec(5) tabulator support We don't want such bloat in ed(1)!
author markus schnalke <meillo@marmaro.de>
date Sun, 12 Apr 2015 21:45:34 +0200
parents
children 4165f1b57d18
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 regexpr.o sigset.o sigrelse.o
92 $(LD) $(LDFLAGS) ed.o -o ed
94 ed.o: ed.c regexp.h
95 $(CC) $(CFLAGS) $(CPPFLAGS) $(IWCHAR) -DSHELL='"$(SHELL)"' -I. -c ed.c
97 regexpr.o: regexpr.c regexpr.h regexp.h
98 $(CC) $(CFLAGS) $(CPPFLAGS) $(IWCHAR) -I. -c regexpr.c
100 sigset.o: sigset.c sigset.h
101 $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c sigset.c
103 sigrelse.o: sigrelse.c sigset.h
104 $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c sigrelse.c
107 install: all
108 mkdir -p $(ROOT)$(BINDIR)
109 cp ed $(ROOT)$(BINDIR)/ed
110 chmod 755 $(ROOT)$(BINDIR)/ed
111 $(STRIP) $(ROOT)$(BINDIR)/ed
112 mkdir -p $(ROOT)$(MANDIR)/man1
113 cp ed.1 $(ROOT)$(MANDIR)/man1/ed.1
114 chmod 644 $(ROOT)$(MANDIR)/man1/ed.1
116 clean:
117 rm -f ed.o regexpr.o sigset.o sigrelse.o core log *~
119 mrproper: clean
120 rm -f ed