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