Check-in [13b69230ce]
Overview
Comment:Added install target
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 13b69230ce99d15b3511fccb864cb6adfb97f881
User & Date: rkeene on 2014-02-07 21:06:25
Other Links: manifest | tags
Context
2014-02-07
21:10
Updated to support disabling getpwnam() check-in: e7dc183669 user: rkeene tags: trunk
21:06
Added install target check-in: 13b69230ce user: rkeene tags: trunk
20:43
Updated man page check-in: f1c59a3a0d user: rkeene tags: trunk
Changes

Modified Makefile from [982e814a3a] to [d4f93cadc6].

1
2
3
4







5
6
7
8
9
10






11
12
13
14
15
16
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
LDFLAGS = -pthread
LIBS = -lpthread








filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c







clean:
	rm -f filed filed.o

distclean: clean

.PHONY: clean distclean




>
>
>
>
>
>
>






>
>
>
>
>
>





|
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
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
LDFLAGS = -pthread
LIBS = -lpthread

PREFIX = /usr/local
prefix = $(PREFIX)
bindir = $(prefix)/bin
mandir = $(prefix)/share/man

all: filed

filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c

install: filed filed.1
	test -d "$(DESTDIR)$(mandir)/man1" || mkdir -p "$(DESTDIR)$(mandir)/man1"
	test -d "$(DESTDIR)$(bindir)" || mkdir -p "$(DESTDIR)$(bindir)"
	cp filed.1 "$(DESTDIR)$(mandir)/man1/"
	cp filed "$(DESTDIR)$(bindir)/"

clean:
	rm -f filed filed.o

distclean: clean

.PHONY: all install clean distclean