author | viric <viriketo@gmail.com> |
Sun, 20 Mar 2016 11:25:53 +0100 | |
changeset 346 | 90545736507e |
parent 344 | 9be22a4aa695 |
permissions | -rw-r--r-- |
78 | 1 |
PREFIX?=/usr/local |
121 | 2 |
GLIBCFLAGS=-D_XOPEN_SOURCE=500 -D__STRICT_ANSI__ |
344
9be22a4aa695
Description: Respect external CFLAGS and CPPFLAGS
viric <viriketo@gmail.com>
parents:
240
diff
changeset
|
3 |
CPPFLAGS+=$(GLIBCFLAGS) |
9be22a4aa695
Description: Respect external CFLAGS and CPPFLAGS
viric <viriketo@gmail.com>
parents:
240
diff
changeset
|
4 |
CFLAGS?=-pedantic -ansi -Wall -g -O0 |
32 | 5 |
OBJECTS=main.o \ |
6 |
server.o \ |
|
7 |
server_start.o \ |
|
8 |
client.o \ |
|
9 |
msgdump.o \ |
|
10 |
jobs.o \ |
|
11 |
execute.o \ |
|
12 |
msg.o \ |
|
92
05004c52ecff
Better error reports on internal handled errors.
viric@llimona
parents:
88
diff
changeset
|
13 |
mail.o \ |
95 | 14 |
error.o \ |
117 | 15 |
signals.o \ |
146 | 16 |
list.o \ |
17 |
print.o \ |
|
147 | 18 |
info.o \ |
174
c112f67965fb
Our implementation of -t (equivalent tail -f), which now
viric@llimona
parents:
173
diff
changeset
|
19 |
env.o \ |
c112f67965fb
Our implementation of -t (equivalent tail -f), which now
viric@llimona
parents:
173
diff
changeset
|
20 |
tail.o |
240
9ecdf06ddf5d
Removing direct references to /usr in the Makefile, for nix.
viric@mandarina
parents:
208
diff
changeset
|
21 |
INSTALL=install -c |
30
ab88478a7e9b
The commandline parameters are centered in a struct.
viric@llimona
parents:
18
diff
changeset
|
22 |
|
88
bdd6018f66fd
Fixed the declaration warnings in the compilation.
lbatlle@npdl268.bpo.hp.com
parents:
85
diff
changeset
|
23 |
all: ts |
bdd6018f66fd
Fixed the declaration warnings in the compilation.
lbatlle@npdl268.bpo.hp.com
parents:
85
diff
changeset
|
24 |
|
133 | 25 |
tsretry: tsretry.c |
26 |
||
83 | 27 |
ts: $(OBJECTS) |
121 | 28 |
$(CC) $(LDFLAGS) -o ts $^ |
29 |
||
183
95d49e8a8cec
Updating 'help' and some other related files to 0.5
viric@llimona
parents:
174
diff
changeset
|
30 |
# Test our 'tail' implementation. |
173
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
31 |
ttail: tail.o ttail.o |
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
32 |
$(CC) $(LDFLAGS) -o ttail $^ |
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
33 |
|
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
34 |
|
121 | 35 |
.c.o: |
344
9be22a4aa695
Description: Respect external CFLAGS and CPPFLAGS
viric <viriketo@gmail.com>
parents:
240
diff
changeset
|
36 |
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< |
83 | 37 |
|
79 | 38 |
# Dependencies |
78 | 39 |
main.o: main.c main.h |
40 |
server_start.o: server_start.c main.h |
|
118 | 41 |
server.o: server.c main.h |
42 |
client.o: client.c main.h |
|
43 |
msgdump.o: msgdump.c main.h |
|
44 |
jobs.o: jobs.c main.h |
|
45 |
execute.o: execute.c main.h |
|
46 |
msg.o: msg.c main.h |
|
78 | 47 |
mail.o: mail.c main.h |
118 | 48 |
error.o: error.c main.h |
95 | 49 |
signals.o: signals.c main.h |
117 | 50 |
list.o: list.c main.h |
173
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
51 |
tail.o: tail.c main.h |
b572fdd206f4
Adding some code base for our implementation of 'tail'.
viric@llimona
parents:
163
diff
changeset
|
52 |
ttail.o: ttail.c main.h |
32 | 53 |
|
30
ab88478a7e9b
The commandline parameters are centered in a struct.
viric@llimona
parents:
18
diff
changeset
|
54 |
clean: |
ab88478a7e9b
The commandline parameters are centered in a struct.
viric@llimona
parents:
18
diff
changeset
|
55 |
rm -f *.o ts |
78 | 56 |
|
109 | 57 |
install: ts |
78 | 58 |
$(INSTALL) -d $(PREFIX)/bin |
59 |
$(INSTALL) ts $(PREFIX)/bin |
|
205
c0559c4696f3
Check in a patch from Alexander V. Inyukhin related to better debian packages building.
viric@llimona
parents:
183
diff
changeset
|
60 |
$(INSTALL) -d $(PREFIX)/share/man/man1 |
163
820fb5d34e9c
Man page on PREFIX/share/man/man1 . Version of the manpage.
viric@mandarina
parents:
147
diff
changeset
|
61 |
$(INSTALL) -m 644 ts.1 $(PREFIX)/share/man/man1 |