~ubuntu-branches/ubuntu/lucid/enigmail/lucid-security

« back to all changes in this revision

Viewing changes to testing/mozbase/mozprocess/tests/iniparser/Makefile

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-11-12 16:36:01 UTC
  • mfrom: (0.11.6)
  • Revision ID: package-import@ubuntu.com-20121112163601-8c5yisdr8sxei4rv
Tags: 2:1.4.6-0ubuntu0.10.04.1
* New upstream release v1.4.6
  - see LP: #1080212 for USN information
* Drop unneeded patches
  - remove debian/patches/correct-version-number.diff
  - remove debian/patches/dont_register_cids_multiple_times.diff
  - update debian/patches/series
* Support building in an objdir
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# iniparser Makefile
 
3
#
 
4
UNAME := $(shell uname -s)
 
5
ifeq ($(UNAME), MINGW32_NT-6.1)
 
6
WIN32 = 1
 
7
endif
 
8
ifeq ($(UNAME), MINGW32_NT-5.1)
 
9
WIN32 = 1
 
10
endif
 
11
 
 
12
ifeq ($(UNAME), Linux)
 
13
    # Compiler settings
 
14
    CC      = gcc
 
15
    # Ar settings to build the library
 
16
    AR      = ar
 
17
    ARFLAGS = rcv
 
18
    SHLD = ${CC} ${CFLAGS}
 
19
    CFLAGS  = -O2 -fPIC -Wall -ansi -pedantic
 
20
    LDSHFLAGS = -shared -Wl,-Bsymbolic  -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
 
21
    LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
 
22
endif
 
23
 
 
24
ifeq ($(UNAME), Darwin)
 
25
    # Compiler settings
 
26
    CC      = gcc
 
27
    # Ar settings to build the library
 
28
    AR      = ar
 
29
    ARFLAGS = rcv
 
30
    #SHLD = ${CC} ${CFLAGS}
 
31
    SHLD = libtool
 
32
    CFLAGS  = -v -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -Wall -ansi -pedantic
 
33
    LDFLAGS = -arch_only i386
 
34
endif
 
35
 
 
36
ifeq ($(WIN32), 1)
 
37
    CC = cl
 
38
    CFLAGS = //Od //D "_WIN32" //D "WIN32" //D "_CONSOLE" //D "_CRT_SECURE_NO_WARNINGS" //D "_UNICODE" //D "UNICODE" //Gm //EHsc //RTC1 //MDd //W3 //nologo //c //ZI //TC
 
39
    LDFLAGS = //OUT:"iniparser.lib" //NOLOGO
 
40
    LINK = lib
 
41
endif
 
42
    
 
43
ifeq ($(WIN32), 1)
 
44
SUFFIXES = .obj .c .h .lib
 
45
 
 
46
COMPILE.c=$(CC) $(CFLAGS) -c
 
47
 
 
48
#.c.obj:
 
49
#       @(echo "compiling $< ...")
 
50
#       @($(COMPILE.c) $@ $<)
 
51
 
 
52
all: iniparser.obj dictionary.obj iniparser.lib
 
53
 
 
54
SRCS = iniparser.c \
 
55
        dictionary.c
 
56
OBJS = $(SRCS:.c=.obj)
 
57
 
 
58
iniparser.obj: dictionary.obj
 
59
        @($(CC) $(CFLAGS) iniparser.c)
 
60
 
 
61
dictionary.obj:
 
62
        @($(CC) $(CFLAGS) dictionary.c)
 
63
 
 
64
iniparser.lib:  dictionary.obj iniparser.obj
 
65
        @(echo "linking $(OBJS)")
 
66
        @($(LINK) $(LDFLAGS) $(OBJS))
 
67
 
 
68
else
 
69
# Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
 
70
# RANLIB  = ranlib
 
71
RANLIB = true
 
72
 
 
73
RM      = rm -f
 
74
 
 
75
# Implicit rules
 
76
 
 
77
SUFFIXES = .o .c .h .a .so .sl
 
78
 
 
79
COMPILE.c=$(CC) $(CFLAGS) -c
 
80
.c.o:
 
81
        @(echo "compiling $< ...")
 
82
        @($(COMPILE.c) -o $@ $<)
 
83
 
 
84
 
 
85
SRCS = iniparser.c \
 
86
           dictionary.c
 
87
 
 
88
OBJS = $(SRCS:.c=.o)
 
89
 
 
90
 
 
91
default:        libiniparser.a libiniparser.so
 
92
 
 
93
libiniparser.a: $(OBJS)
 
94
        @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
 
95
        @($(RANLIB) libiniparser.a)
 
96
 
 
97
ifeq ($(UNAME), Linux)
 
98
libiniparser.so:        $(OBJS)
 
99
        @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS)
 
100
else
 
101
libiniparser.so:        $(OBJS)
 
102
        @$(SHLD) -o $@.0 $(LDFLAGS) $(OBJS)
 
103
endif
 
104
endif
 
105
 
 
106
clean:
 
107
        $(RM) $(OBJS)
 
108
 
 
109
veryclean:
 
110
        $(RM) $(OBJS) libiniparser.a libiniparser.so*
 
111
        rm -rf ./html ; mkdir html
 
112
        cd test ; $(MAKE) veryclean
 
113
 
 
114
docs:
 
115
        @(cd doc ; $(MAKE))
 
116
 
 
117
check:
 
118
        @(cd test ; $(MAKE))