~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Makefile.gnu

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-07-20 13:42:15 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100720134215-xt1454zaedv3b604
Tags: 3.13.1-0ubuntu1
* New upstream release. Closes: (LP: #607800)
 - Updated debian/freeimage-get-orig-source script.
 - Removing no longer necessary debian/patches/* and
   the patch system in debian/rules.
 - Updated debian/rules to work with the new Makefiles.
 - Drop from -O3 to -O2 and use lzma compression saves
   ~10 MB of free space. 
* lintian stuff
 - fixed debhelper-but-no-misc-depends
 - fixed ldconfig-symlink-missing-for-shlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
include Makefile.srcs
5
5
 
6
6
# General configuration variables:
7
 
CC = gcc
8
 
CXX = g++
9
 
AR = ar
10
 
 
11
 
INCDIR = /usr/include
12
 
INSTALLDIR = /usr/lib
 
7
DESTDIR ?= /
 
8
INCDIR ?= $(DESTDIR)/usr/include
 
9
INSTALLDIR ?= $(DESTDIR)/usr/lib
13
10
 
14
11
# Converts cr/lf to just lf
15
12
DOS2UNIX = dos2unix
16
13
 
17
 
COMPILERFLAGS = -O3 -fPIC -fexceptions -fvisibility=hidden
18
14
LIBRARIES = -lstdc++
19
15
 
20
16
MODULES = $(SRCS:.c=.o)
21
17
MODULES := $(MODULES:.cpp=.o)
22
 
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
23
 
CXXFLAGS = $(COMPILERFLAGS)  -Wno-ctor-dtor-privacy $(INCLUDE)
 
18
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
 
19
CFLAGS += $(INCLUDE)
 
20
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
 
21
CXXFLAGS += $(INCLUDE)
 
22
 
 
23
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
 
24
        CFLAGS += -fPIC
 
25
        CXXFLAGS += -fPIC
 
26
endif
24
27
 
25
28
TARGET  = freeimage
26
29
STATICLIB = lib$(TARGET).a
55
58
        $(AR) r $@ $(MODULES)
56
59
 
57
60
$(SHAREDLIB): $(MODULES)
58
 
        $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)
 
61
        $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
59
62
 
60
63
install:
 
64
        install -d $(INCDIR) $(INSTALLDIR)
61
65
        install -m 644 -o root -g root $(HEADER) $(INCDIR)
62
66
        install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
63
67
        install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
64
 
        ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
65
 
        ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)   
66
 
        ldconfig
67
68
 
68
69
clean:
69
70
        rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)