summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install/files/add/Makefile.in
blob: 647e71454e57f89f5cee63867d256e422569ffb1 (plain)
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
46
47
48
49
50
51
52
53
54
# $NetBSD: Makefile.in,v 1.27 2012/10/21 09:08:56 joerg Exp $

srcdir=		@srcdir@

prefix=		@prefix@
exec_prefix=	@exec_prefix@
sbindir=	@sbindir@
mandir=		@mandir@
datarootdir=	@datarootdir@

man1dir=	$(mandir)/man1
cat1dir=	$(mandir)/cat1

CC=		@CC@
CCLD=		$(CC)
CPPFLAGS=	@CPPFLAGS@ -I. -I$(srcdir) -I../lib
DEFS=		@DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\"
CFLAGS=		@CFLAGS@
LDFLAGS=	@LDFLAGS@ -L../lib

SSL_SUPPORT=	@ssl_support@

LIBS=		-linstall -lfetch
.if !empty(SSL_SUPPORT)
LIBS+=		-lssl -lcrypto
.endif
LIBS+=		@LIBS@

INSTALL=	@INSTALL@

PROG=		pkg_add

OBJS=	main.o perform.o

all: $(PROG)

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

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

clean:
	rm -f $(OBJS) $(PROG)

install:
	$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
	$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
	$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
	$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
.if defined(MANINSTALL) && !empty(MANINSTALL:Mcatinstall)
	$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
	$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
.endif