From 536a88ac83ed5f3e770655c64cca792b7391b3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Tue, 18 Sep 2007 15:25:47 +0000 Subject: [PATCH] correctly install in $prefix conditionally include config.mak, we dont need it upon clean --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 82c25811..a957fe71 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -include ../config.mak +-include ../config.mak SRCS = main.c dispatch.c channels.c transports.c teletext.c psi.c @@ -53,10 +53,14 @@ OBJS = $(patsubst %.c,%.o, $(SRCS)) OBJS += $(patsubst %.arbfp1,%.o, $(CG_SRCS)) DEPS= ${OBJS:%.o=%.d} +prefix ?= $(INSTALLPREFIX) +INSTDIR= $(prefix)/bin + all: $(PROG) install: - cd $(.OBJDIR) && install ${PROG} $(CURDIR)/../bin + mkdir -p $(INSTDIR) + cd $(.OBJDIR) && install -s ${PROG} $(INSTDIR) ${PROG}: $(.OBJDIR) $(OBJS) Makefile cd $(.OBJDIR) && $(CC) $(LDFLAGS) -o $@ $(OBJS) \