correctly install in $prefix
conditionally include config.mak, we dont need it upon clean
This commit is contained in:
parent
19f6af2e67
commit
536a88ac83
1 changed files with 6 additions and 2 deletions
8
Makefile
8
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) \
|
||||
|
|
Loading…
Add table
Reference in a new issue