Project

General

Profile

Feature #852 ยป 0001-Minor-Makefile-improvements.patch

idl0r, 01/15/2012 08:15 PM

View differences:

Makefile
# External image lib to use: imagemagick, graphicsmagick, imlib2 or none
IMAGELIB = imagemagick
WANT_I18N=1
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING
# -------------------------------------------------------------
......
### The C++ compiler and options:
CXX ?= g++
CXXFLAGS ?= -fPIC -Wall -Woverloaded-virtual
ifdef DEBUG
CXXFLAGS ?= -Wall -Woverloaded-virtual
else
CXXFLAGS ?= -Wall -Woverloaded-virtual -O3
endif
CXXFLAGS += -fPIC
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included (VDR >= 1.7.13):
......
ifdef DEBUG
CXXFLAGS += -g -fno-inline
DEFINES += -DDEBUG
else
CXXFLAGS += -O3
STRIP=
ifdef BENCH
DEFINES += -DBENCH
endif
......
-include $(DEPFILE)
### Internationalization (I18N):
ifdef WANT_I18N
PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(notdir $(wildcard $(PODIR)/*.po))
......
$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.po
@mkdir -p $(dir $@)
msgfmt -c -o $@ $<
endif
.PHONY: i18n
i18n: $(I18Npo:%.po=$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo)
......
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
ifndef DEBUG
ifdef STRIP
$(STRIP) $(LIBDIR)/$@.$(APIVERSION)
endif
    (1-1/1)