File: Makefile

package info (click to toggle)
bsd-mailx 8.1.2-0.20141216cvs-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,776 kB
  • ctags: 1,814
  • sloc: ansic: 6,894; makefile: 56; sh: 23
file content (45 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#	$OpenBSD: Makefile,v 1.10 2014/07/22 17:05:45 deraadt Exp $

PROG=	mail
CC ?=	gcc

CFLAGS += -D_BSD_SOURCE -DDEBIAN -g -Wall

SRCS=	version.c aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c \
	edit.c fio.c getname.c head.c v7.local.c lex.c list.c main.c names.c \
	popen.c quit.c send.c strings.c temp.c tty.c vars.c

OBJS=$(SRCS:%.c=%.o)
LIBS=-llockfile -lbsd

SFILES=	mail.help mail.tildehelp
EFILES=	mail.rc
MFILES=	mail.1

all: $(PROG)

distribution:
	cd ${.CURDIR}/misc; ${INSTALL} ${INSTALL_COPY} -o root -g wheel \
	    -m 644 ${EFILES} ${DESTDIR}/etc
	cd ${.CURDIR}/misc; ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
	    -m 444 ${SFILES} ${DESTDIR}/usr/share/misc


$(PROG): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@

.y.c:
	bison $<
	mv -f $*.tab.c $@

clean:
	rm -f $(PROG) $(OBJS) *~ core

install:
	install -p -c -m 755 $(PROG) $(DESTDIR)/usr/bin/bsd-mailx
	install -p -c -m 644 $(MFILES) $(DESTDIR)/usr/share/man/man1/bsd-mailx.1
	cd misc && install -p -c -m 644 $(EFILES) $(DESTDIR)/etc/
	cd misc && install -p -c -m 644 $(SFILES) $(DESTDIR)/usr/share/bsd-mailx/