~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_libraries/ADM_smjs/Makefile.ref

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2007-12-18 13:53:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071218135304-cdqec2lg2bglyz15
Tags: 1:2.4~preview3-0.0ubuntu1
* Upload to Ubuntu. (LP: #163287, LP: #126572)
* debian/changelog: re-added Ubuntu releases.
* debian/control:
  - Require debhelper >= 5.0.51 (for dh_icons) and imagemagick.
  - Build-depend on libsdl1.2-dev instead of libsdl-dev.
  - Build against newer libx264-dev. (LP: #138854)
  - Removed libamrnb-dev, not in Ubuntu yet.
* debian/rules:
  - Install all icon sizes, using convert (upstream installs none).
  - Added missing calls to dh_installmenu, dh_installman, dh_icons and
    dh_desktop.
* debian/menu, debian/avidemux-qt.menu:
  - Corrected package and executable names.
* debian/avidemux-common.install: Install icons.
* debian/avidemux.common.manpages: Install man/avidemux.1.
* debian/links, debian/avidemux-cli.links, debian/avidemux-gtk.links:
  - Link manpages to avidemux.1.gz.
* debian/install, debian/avidemux-qt.install, debian/avidemux-gtk.desktop,
  debian/avidemux-qt.desktop: Install desktop files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: makefile -*-
 
2
#
 
3
# ***** BEGIN LICENSE BLOCK *****
 
4
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
5
#
 
6
# The contents of this file are subject to the Mozilla Public License Version
 
7
# 1.1 (the "License"); you may not use this file except in compliance with
 
8
# the License. You may obtain a copy of the License at
 
9
# http://www.mozilla.org/MPL/
 
10
#
 
11
# Software distributed under the License is distributed on an "AS IS" basis,
 
12
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
13
# for the specific language governing rights and limitations under the
 
14
# License.
 
15
#
 
16
# The Original Code is Mozilla Communicator client code, released
 
17
# March 31, 1998.
 
18
#
 
19
# The Initial Developer of the Original Code is
 
20
# Netscape Communications Corporation.
 
21
# Portions created by the Initial Developer are Copyright (C) 1998
 
22
# the Initial Developer. All Rights Reserved.
 
23
#
 
24
# Contributor(s):
 
25
#   Michael Ang <mang@subcarrier.org>
 
26
#   Kevin Buhr <buhr@stat.wisc.edu>
 
27
#
 
28
# Alternatively, the contents of this file may be used under the terms of
 
29
# either of the GNU General Public License Version 2 or later (the "GPL"),
 
30
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
31
# in which case the provisions of the GPL or the LGPL are applicable instead
 
32
# of those above. If you wish to allow use of your version of this file only
 
33
# under the terms of either the GPL or the LGPL, and not to allow others to
 
34
# use your version of this file under the terms of the MPL, indicate your
 
35
# decision by deleting the provisions above and replace them with the notice
 
36
# and other provisions required by the GPL or the LGPL. If you do not delete
 
37
# the provisions above, a recipient may use your version of this file under
 
38
# the terms of any one of the MPL, the GPL or the LGPL.
 
39
#
 
40
# ***** END LICENSE BLOCK *****
 
41
 
 
42
#
 
43
# JSRef GNUmake makefile.
 
44
#
 
45
# Note: dependency rules are missing for some files (some
 
46
#       .h, all .msg, etc.)  Re-make clean if in doubt.
 
47
#
 
48
 
 
49
 
 
50
DEPTH = .
 
51
 
 
52
include config.mk
 
53
 
 
54
#NS_USE_NATIVE = 1
 
55
 
 
56
ifdef USE_MSVC
 
57
OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib
 
58
else
 
59
OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm
 
60
endif
 
61
 
 
62
ifdef JS_THREADSAFE
 
63
DEFINES += -DJS_THREADSAFE
 
64
INCLUDES += -I../../dist/$(OBJDIR)/include
 
65
ifdef USE_MSVC
 
66
OTHER_LIBS += ../../dist/$(OBJDIR)/lib/libnspr${NSPR_LIBSUFFIX}.lib
 
67
else
 
68
OTHER_LIBS += -L../../dist/$(OBJDIR)/lib -lnspr${NSPR_LIBSUFFIX}
 
69
endif
 
70
endif
 
71
 
 
72
ifdef JS_NO_THIN_LOCKS
 
73
DEFINES += -DJS_USE_ONLY_NSPR_LOCKS
 
74
endif
 
75
 
 
76
ifdef JS_HAS_FILE_OBJECT
 
77
DEFINES += -DJS_HAS_FILE_OBJECT
 
78
endif
 
79
 
 
80
#
 
81
# XCFLAGS may be set in the environment or on the gmake command line
 
82
#
 
83
CFLAGS          += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
 
84
 
 
85
LDFLAGS         = $(XLDFLAGS)
 
86
 
 
87
ifndef NO_LIBM
 
88
LDFLAGS += -lm
 
89
endif
 
90
 
 
91
# Prevent floating point errors caused by VC++ optimizations
 
92
ifeq ($(OS_ARCH),WINNT)
 
93
_MSC_VER = $(shell $(CC) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
 
94
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
 
95
CFLAGS += -Op
 
96
else
 
97
CFLAGS += -fp:precise
 
98
endif
 
99
endif # WINNT
 
100
 
 
101
#
 
102
# Ask perl what flags it was built with, so we can build js with similar flags
 
103
# and link properly.  Viva gmake.
 
104
#
 
105
ifdef JS_PERLCONNECT
 
106
DEFINES += -DPERLCONNECT -D_GNU_SOURCE
 
107
 
 
108
PERLCFLAGS := $(shell perl -MExtUtils::Embed -e ccopts)
 
109
PERLLDFLAGS := $(shell perl -MExtUtils::Embed -e ldopts)
 
110
 
 
111
# perl erroneously reports compiler flag -rdynamic (interpreted by ld
 
112
# as -r) when it really meant -export-dynamic.
 
113
PERLLDFLAGS := $(subst -rdynamic,-export-dynamic,$(PERLLDFLAGS))
 
114
 
 
115
CFLAGS += $(PERLCFLAGS)
 
116
#LDFLAGS += $(PERLLDFLAGS) #PH removed this assgnment
 
117
INCLUDES += -I. #needed for perlconnect/jsperl.c
 
118
endif
 
119
 
 
120
#
 
121
#       Server-related changes :
 
122
#
 
123
ifdef NES40 
 
124
DEFINES += -DNES40 
 
125
endif 
 
126
 
 
127
#
 
128
# Line editing support.
 
129
# Define JS_READLINE or JS_EDITLINE to enable line editing in the
 
130
# js command-line interpreter.
 
131
#
 
132
ifdef JS_READLINE
 
133
# For those platforms with the readline library installed.
 
134
DEFINES += -DEDITLINE
 
135
PROG_LIBS += -lreadline -ltermcap
 
136
else
 
137
ifdef JS_EDITLINE
 
138
# Use the editline library, built locally.
 
139
PREDIRS += editline
 
140
DEFINES += -DEDITLINE
 
141
PROG_LIBS += editline/$(OBJDIR)/libedit.a
 
142
endif
 
143
endif
 
144
 
 
145
# For purify
 
146
PURE_CFLAGS     = -DXP_UNIX $(OPTIMIZER) $(PURE_OS_CFLAGS) $(DEFINES) \
 
147
                  $(INCLUDES) $(XCFLAGS)
 
148
 
 
149
#
 
150
# JS file lists
 
151
#
 
152
JS_HFILES =             \
 
153
        jsarray.h       \
 
154
        jsatom.h        \
 
155
        jsbool.h        \
 
156
        jsconfig.h      \
 
157
        jscntxt.h       \
 
158
        jsdate.h        \
 
159
        jsemit.h        \
 
160
        jsexn.h         \
 
161
        jsfun.h         \
 
162
        jsgc.h          \
 
163
        jsinterp.h      \
 
164
        jslibmath.h     \
 
165
        jslock.h        \
 
166
        jsmath.h        \
 
167
        jsnum.h         \
 
168
        jsobj.h         \
 
169
        jsopcode.h      \
 
170
        jsparse.h       \
 
171
        jsarena.h       \
 
172
        jsclist.h       \
 
173
        jsdhash.h       \
 
174
        jsdtoa.h        \
 
175
        jshash.h        \
 
176
        jslong.h        \
 
177
        jsosdep.h       \
 
178
        jstypes.h       \
 
179
        jsprvtd.h       \
 
180
        jspubtd.h       \
 
181
        jsregexp.h      \
 
182
        jsscan.h        \
 
183
        jsscope.h       \
 
184
        jsscript.h      \
 
185
        jsstr.h         \
 
186
        jsxdrapi.h      \
 
187
        jsxml.h         \
 
188
        $(NULL)
 
189
 
 
190
API_HFILES =            \
 
191
        jsapi.h         \
 
192
        jsdbgapi.h      \
 
193
        $(NULL)
 
194
 
 
195
OTHER_HFILES =          \
 
196
        jsbit.h         \
 
197
        jscompat.h      \
 
198
        jscpucfg.h      \
 
199
        jsotypes.h      \
 
200
        jsstddef.h      \
 
201
        prmjtime.h      \
 
202
        resource.h      \
 
203
        jsopcode.tbl    \
 
204
        js.msg          \
 
205
        jsshell.msg     \
 
206
        $(NULL)
 
207
 
 
208
ifndef PREBUILT_CPUCFG
 
209
OTHER_HFILES += $(OBJDIR)/jsautocfg.h
 
210
endif
 
211
 
 
212
HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
 
213
 
 
214
JS_CFILES =             \
 
215
        jsapi.c         \
 
216
        jsarena.c       \
 
217
        jsarray.c       \
 
218
        jsatom.c        \
 
219
        jsbool.c        \
 
220
        jscntxt.c       \
 
221
        jsdate.c        \
 
222
        jsdbgapi.c      \
 
223
        jsdhash.c       \
 
224
        jsdtoa.c        \
 
225
        jsemit.c        \
 
226
        jsexn.c         \
 
227
        jsfun.c         \
 
228
        jsgc.c          \
 
229
        jshash.c        \
 
230
        jsinterp.c      \
 
231
        jslock.c        \
 
232
        jslog2.c        \
 
233
        jslong.c        \
 
234
        jsmath.c        \
 
235
        jsnum.c         \
 
236
        jsobj.c         \
 
237
        jsopcode.c      \
 
238
        jsparse.c       \
 
239
        jsprf.c         \
 
240
        jsregexp.c      \
 
241
        jsscan.c        \
 
242
        jsscope.c       \
 
243
        jsscript.c      \
 
244
        jsstr.c         \
 
245
        jsutil.c        \
 
246
        jsxdrapi.c      \
 
247
        jsxml.c         \
 
248
        prmjtime.c      \
 
249
        $(NULL)
 
250
 
 
251
PREDIRS += fdlibm
 
252
 
 
253
ifdef USE_MSVC
 
254
FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/fdlibm.lib
 
255
else
 
256
FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/libfdm.a
 
257
endif
 
258
JSMATH_PRELINK  = $(OBJDIR)/jsmathtemp.o
 
259
# Flag for incremental linking
 
260
DASH_R          = -r
 
261
 
 
262
ifeq ($(OS_ARCH),QNX)
 
263
ifneq ($(OS_TARGET),NTO)
 
264
# Don't use wildcard here, because we only want this resolved at link time.
 
265
OBJS            += fdlibm/*.o
 
266
endif
 
267
endif
 
268
 
 
269
ifdef JS_LIVECONNECT
 
270
DIRS      += liveconnect
 
271
endif
 
272
 
 
273
ifdef JS_PERLCONNECT
 
274
JS_CFILES += perlconnect/jsperl.c
 
275
endif
 
276
 
 
277
ifdef JS_HAS_FILE_OBJECT
 
278
JS_CFILES += jsfile.c
 
279
JS_HFILES += jsfile.h
 
280
endif
 
281
 
 
282
LIB_CFILES  = $(JS_CFILES)
 
283
LIB_ASFILES := $(wildcard *_$(OS_ARCH).s)
 
284
PROG_CFILES = js.c
 
285
 
 
286
ifdef USE_MSVC
 
287
LIBRARY = $(OBJDIR)/js32.lib
 
288
SHARED_LIBRARY = $(OBJDIR)/js32.dll
 
289
PROGRAM = $(OBJDIR)/js.exe
 
290
else
 
291
LIBRARY = $(OBJDIR)/libjs.a
 
292
SHARED_LIBRARY = $(OBJDIR)/libjs.$(SO_SUFFIX)
 
293
PROGRAM = $(OBJDIR)/js
 
294
ifdef JS_PERLCONNECT
 
295
PROG_LIBS += $(PERLLDFLAGS)
 
296
endif
 
297
endif
 
298
 
 
299
include rules.mk
 
300
 
 
301
MOZ_DEPTH = ../..
 
302
include jsconfig.mk
 
303
 
 
304
nsinstall-target:
 
305
        cd ../../config; $(MAKE) OBJDIR=$(OBJDIR) OBJDIR_NAME=$(OBJDIR)
 
306
ifdef USE_MSVC
 
307
$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
 
308
        link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
 
309
else
 
310
$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
 
311
        $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
 
312
            $(PROG_LIBS)
 
313
endif
 
314
 
 
315
$(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)
 
316
        purify $(PUREFLAGS) \
 
317
            $(CC) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
 
318
                $(OTHER_LIBS) $(PROG_LIBS)
 
319
 
 
320
ifndef PREBUILT_CPUCFG
 
321
$(HFILES) $(CFILES): $(OBJDIR)/jsautocfg.h
 
322
 
 
323
$(OBJDIR)/jsautocfg.h: $(OBJDIR)/jscpucfg
 
324
        rm -f $@
 
325
        $(OBJDIR)/jscpucfg > $@
 
326
 
 
327
$(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
 
328
        $(CC) -o $@ $(OBJDIR)/jscpucfg.o
 
329
 
 
330
# Look in OBJDIR to find jsautocfg.h
 
331
INCLUDES   += -I$(OBJDIR)
 
332
 
 
333
# Add to TARGETS for clobber rule
 
334
TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
 
335
        $(OBJDIR)/jscpucfg.o $(OBJDIR)/jsmathtemp.o
 
336
endif
 
337
 
 
338
 
 
339
# special rule for jsmath.o since we want to incrementally link
 
340
# against fdlibm to pull in only what is needed
 
341
$(OBJDIR)/jsmath.o: jsmath.c jsmath.h jslibmath.h $(FDLIBM_LIBRARY)
 
342
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 
343
        $(CC) -Fo$(JSMATH_PRELINK) -c $(CFLAGS) $<
 
344
else
 
345
        $(CC) -o $(JSMATH_PRELINK) -c $(CFLAGS) $<
 
346
endif
 
347
 
 
348
ifeq ($(OS_ARCH),QNX)
 
349
ifneq ($(OS_TARGET),NTO)
 
350
        @cp $(JSMATH_PRELINK) $@
 
351
else    
 
352
        $(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY)
 
353
endif
 
354
else
 
355
ifdef USE_MSVC
 
356
        @echo Warning: to use $(LIBRARY) must also link against $(FDLIBM_LIBRARY)
 
357
        @cp $(JSMATH_PRELINK) $@
 
358
endif
 
359
        $(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY)
 
360
endif
 
361
 
 
362
# Note: generated headers must be built before descending
 
363
#       into fdlibm directory
 
364
$(FDLIBM_LIBRARY) :
 
365
        $(MAKE) -C fdlibm -f Makefile.ref $(@F)
 
366
 
 
367
#
 
368
# Hardwire dependencies on jsopcode.tbl
 
369
#
 
370
jsopcode.h jsopcode.c: jsopcode.tbl
 
371
 
 
372
-include $(DEPENDENCIES)
 
373
 
 
374
TARNAME = jsref.tar
 
375
TARFILES = files `cat files`
 
376
 
 
377
SUFFIXES: .i
 
378
%.i: %.c
 
379
        $(CC) -C -E $(CFLAGS) $< > $*.i