[BACK]Return to Makefile.in CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / add

File: [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / add / Makefile.in (download)

Revision 1.11, Wed Feb 11 11:31:26 2004 UTC (17 years, 11 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2004Q2-base, pkgsrc-2004Q2, pkgsrc-2004Q1-base, pkgsrc-2004Q1
Changes since 1.10: +2 -2 lines

just use ${OPSYS} and ${MACHINE_ARCH} from the environment. this means
we can set it in the environment if bootstrapping or have pkgsrc do it
for us.

# $NetBSD: Makefile.in,v 1.11 2004/02/11 11:31:26 grant Exp $

srcdir=		@srcdir@

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

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

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

INSTALL=	@INSTALL@

PROG=		pkg_add

SRCS=	main.c perform.c futil.c extract.c verify.c
OBJS=	$(SRCS:.c=.o)

.PHONY: all clean install

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

all: $(PROG)

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

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

install:
	$(INSTALL) -m 755 -d $(sbindir)
	$(INSTALL) -m 755 -d $(man1dir)
	$(INSTALL) -m 755 -d $(cat1dir)
	$(INSTALL) $(PROG) $(sbindir)
	$(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
	$(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0