/[projet1]/public/pc/shared_libraries/freeimage/v3.12.0/Makefile.fip
Defence Force logotype

Contents of /public/pc/shared_libraries/freeimage/v3.12.0/Makefile.fip

Parent Directory Parent Directory | Revision Log Revision Log


Revision 126 - (show annotations)
Mon Jul 13 12:20:10 2009 UTC (10 years, 7 months ago) by dbug
File size: 1750 byte(s)
Added some shared libraries (UnitTest++, and FreeImage) to avoid having every single project brings its own libraries.
Ideally people should add them in a way we can upgrade versions without breaking things:
-> public/pc/shared_libraries/library_name/library_version/actuall_content
1 # Linux makefile for FreeImagePlus
2
3 # This file can be generated by ./genfipsrclist.sh
4 include fipMakefile.srcs
5
6 # General configuration variables:
7 DESTDIR ?= /
8 INCDIR ?= $(DESTDIR)/usr/include
9 INSTALLDIR ?= $(DESTDIR)/usr/lib
10
11 # Converts cr/lf to just lf
12 DOS2UNIX = dos2unix
13
14 LIBRARIES = -lstdc++
15
16 MODULES = $(SRCS:.c=.o)
17 MODULES := $(MODULES:.cpp=.o)
18 CFLAGS ?= -O3 -fexceptions -fvisibility=hidden
19 CFLAGS += $(INCLUDE)
20 CXXFLAGS ?= -O3 -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
27
28 TARGET = freeimageplus
29 STATICLIB = lib$(TARGET).a
30 SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
31 LIBNAME = lib$(TARGET).so
32 VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
33 HEADER = Source/FreeImage.h
34 HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
35
36
37 default: all
38
39 all: dist
40
41 dist: FreeImage
42 cp *.a Dist
43 cp *.so Dist
44 cp Source/FreeImage.h Dist
45 cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist
46
47 dos2unix:
48 @$(DOS2UNIX) $(SRCS)
49
50 FreeImage: $(STATICLIB) $(SHAREDLIB)
51
52 .c.o:
53 $(CC) $(CFLAGS) -c $< -o $@
54
55 .cpp.o:
56 $(CXX) $(CXXFLAGS) -c $< -o $@
57
58 $(STATICLIB): $(MODULES)
59 $(AR) r $@ $(MODULES)
60
61 $(SHAREDLIB): $(MODULES)
62 $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
63
64 install:
65 install -d $(INCDIR) $(INSTALLDIR)
66 install -m 644 -o root -g root $(HEADER) $(INCDIR)
67 install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)
68 install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
69 install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
70
71 clean:
72 rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
73

  ViewVC Help
Powered by ViewVC 1.1.26