Makefile.in 20.5 KB
Newer Older
Michel Kaempf's avatar
Michel Kaempf committed
1
2
3
4
5
6
7
8
9
10
11
################################################################################
# vlc (VideoLAN Client) main makefile
# (c)1998 VideoLAN
################################################################################
# This makefile is the main makefile for the VideoLAN client.
################################################################################

################################################################################
# Configuration
################################################################################

Vincent Seguin's avatar
Vincent Seguin committed
12
# Debugging mode on or off (set to 1 to activate)
13
14
15
DEBUG=@DEBUG@
STATS=@STATS@
OPTIMS=@OPTIMS@
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
16

17
SYS=@SYS@
18
PLUGINS=@PLUGINS@
19
INSTALL=@INSTALL@
20
ARCH=@ARCH@
Sam Hocevar's avatar
   
Sam Hocevar committed
21

Sam Hocevar's avatar
   
Sam Hocevar committed
22
exec_prefix=@exec_prefix@
23
prefix=@prefix@
Sam Hocevar's avatar
   
Sam Hocevar committed
24
25
26
27
bindir=@bindir@
datadir=@datadir@
libdir=@libdir@

Benoit Steiner's avatar
   
Benoit Steiner committed
28
29
30
CC=@CC@
SHELL=@SHELL@

31
#----------------- do not change anything below this line ----------------------
32

Vincent Seguin's avatar
Vincent Seguin committed
33
34
35
36
################################################################################
# Configuration pre-processing
################################################################################

Vincent Seguin's avatar
Vincent Seguin committed
37
# PROGRAM_OPTIONS is an identification string of the compilation options
38
PROGRAM_OPTIONS = $(SYS) $(ARCH)
Vincent Seguin's avatar
Vincent Seguin committed
39
ifeq ($(DEBUG),1)
Vincent Seguin's avatar
Vincent Seguin committed
40
PROGRAM_OPTIONS += DEBUG
41
42
43
44
45
DEFINE += -DDEBUG
endif
ifeq ($(STATS),1)
PROGRAM_OPTIONS += DEBUG
DEFINE += -DSTATS
Vincent Seguin's avatar
Vincent Seguin committed
46
47
48
endif

# PROGRAM_BUILD is a complete identification of the build
49
50
# (we can't use fancy options with date since OSes like Solaris
# or FreeBSD have strange date implementations)
51
PROGRAM_BUILD = `date` $(USER)
52
# XXX: beos does not support hostname (how lame...)
53
#PROGRAM_BUILD = `date` $(USER)@`hostname`
Vincent Seguin's avatar
Vincent Seguin committed
54
55

# DEFINE will contain some of the constants definitions decided in Makefile, 
56
# including SYS_xx. It will be passed to C compiler.
Sam Hocevar's avatar
   
Sam Hocevar committed
57
DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
Vincent Seguin's avatar
Vincent Seguin committed
58

59
60
61
62
63
# On Linux activate 64-bit off_t (by default under BSD)
ifneq (,$(findstring linux,$(SYS)))
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
endif

Michel Kaempf's avatar
Michel Kaempf committed
64
################################################################################
65
# Tuning and other variables - do not change anything except if you know
Vincent Seguin's avatar
Vincent Seguin committed
66
# exactly what you are doing
Michel Kaempf's avatar
Michel Kaempf committed
67
68
69
70
71
################################################################################

#
# C headers directories
#
Sam Hocevar's avatar
   
Sam Hocevar committed
72
INCLUDE += @INCLUDE@
Sam Hocevar's avatar
   
Sam Hocevar committed
73
INCLUDE += -Iinclude -Iextras -I/usr/local/include
Vincent Seguin's avatar
Vincent Seguin committed
74

Michel Kaempf's avatar
Michel Kaempf committed
75
76
77
#
# Libraries
#
78
ifeq ($(SYS),gnu)
79
80
81
LIB += -lthreads -ldl
endif

82
ifneq (,$(findstring bsd,$(SYS)))
83
84
LIB += -pthread -lgnugetopt
LIB += -L/usr/local/lib
85
endif
86

87
ifneq (,$(findstring linux,$(SYS)))
88
89
90
LIB += -lpthread -ldl
endif

Benoit Steiner's avatar
   
Benoit Steiner committed
91
ifneq (,$(findstring solaris,$(SYS)))
Benoit Steiner's avatar
Benoit Steiner committed
92
LIB += -ldl -lsocket -lnsl -lpthread
Benoit Steiner's avatar
   
Benoit Steiner committed
93
94
endif

95
ifneq (,$(findstring darwin,$(SYS)))
Sam Hocevar's avatar
   
Sam Hocevar committed
96
LIB += -ldl
97
98
endif

99
ifeq ($(SYS),beos)
100
101
LIB += -lbe -lroot -lgame
else
102
LIB += -lm
103
endif
104

Michel Kaempf's avatar
Michel Kaempf committed
105
#
Benoit Steiner's avatar
   
Benoit Steiner committed
106
# C compiler flags: mainstream compilation
Michel Kaempf's avatar
Michel Kaempf committed
107
#
108
109
110
111
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
CFLAGS += -D_REENTRANT
CFLAGS += -D_GNU_SOURCE
Michel Kaempf's avatar
Michel Kaempf committed
112

113
# flags needed for clean beos compilation
Sam Hocevar's avatar
Sam Hocevar committed
114
ifeq ($(SYS),beos)
115
CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
Sam Hocevar's avatar
Sam Hocevar committed
116
endif
117

118
119
120
121
ifneq (,$(findstring darwin,$(SYS)))
CFLAGS += -traditional-cpp
endif

Michel Kaempf's avatar
Michel Kaempf committed
122
# Optimizations : don't compile debug versions with them
123
ifeq ($(OPTIMS),1)
124
125
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
126
CFLAGS += -fomit-frame-pointer
127

128
# Optimizations for x86 familiy
129
ifneq (,$(findstring 86,$(ARCH)))
130
# Optional Pentium Pro optimizations
131
ifneq (,$(findstring ppro,$(ARCH)))
132
CFLAGS += -march=pentiumpro -mcpu=pentiumpro
133
else
134
CFLAGS += -march=pentium -mcpu=pentium
135
endif
Vincent Seguin's avatar
Vincent Seguin committed
136
endif
137

Vincent Seguin's avatar
Vincent Seguin committed
138
# Optimizations for PowerPC
139
ifneq (,$(findstring powerpc,$(ARCH)))
140
CFLAGS += -mmultiple -mhard-float -mstring
Vincent Seguin's avatar
Vincent Seguin committed
141
endif
Michel Kaempf's avatar
Michel Kaempf committed
142

143
# Optimizations for Sparc
144
ifneq (,$(findstring sparc,$(ARCH)))
145
CFLAGS += -mhard-float
146
147
endif

Benoit Steiner's avatar
   
Benoit Steiner committed
148
#end of optimisations
149
150
endif

151
# Optional MMX optimizations for x86
152
153
ifneq (,$(findstring mmx,$(ARCH)))
CFLAGS += -DHAVE_MMX
154
155
endif

Benoit Steiner's avatar
   
Benoit Steiner committed
156
157
158
#
# C compiler flags: plugin compilation
#
Sam Hocevar's avatar
   
Sam Hocevar committed
159
160
161
162
163
PCFLAGS += -fPIC

#
# C compiler flags: plugin linking
#
164
ifneq (,$(findstring darwin,$(SYS)))
Sam Hocevar's avatar
   
Sam Hocevar committed
165
166
167
168
PLCFLAGS += -bundle -undefined suppress
else
ifeq ($(SYS),beos)
PLCFLAGS += -nostart plugins/_APP_
169
170
171
else
PLCFLAGS += -shared
endif
Sam Hocevar's avatar
   
Sam Hocevar committed
172
endif
173

Michel Kaempf's avatar
Michel Kaempf committed
174
175
176
177
178
179
180
181
182
183
184
#
# C compiler flags: dependancies
#
DCFLAGS += $(INCLUDE)
DCFLAGS += -MM

#
# C compiler flags: linking
#
LCFLAGS += $(LIB)
LCFLAGS += -Wall
Vincent Seguin's avatar
Vincent Seguin committed
185
#LCFLAGS += -s
Michel Kaempf's avatar
Michel Kaempf committed
186

Sam Hocevar's avatar
   
Sam Hocevar committed
187
188
189
190
191
192
193
194
195
196
197
198
199
200
ifeq ($(SYS),beos)
LCFLAGS += -Xlinker -soname=_APP_
else
ifneq (,$(findstring qnx,$(SYS)))
LCFLAGS += -Xlinker -export-dynamic
else
ifneq (,$(findstring darwin,$(SYS)))
LCFLAGS += -dyn
else
LCFLAGS += --export-dynamic @DYNAMIC_FLAG@
endif
endif
endif

Michel Kaempf's avatar
Michel Kaempf committed
201
#
Benoit Steiner's avatar
   
Benoit Steiner committed
202
# Debugging and profiling support (unless optimisations are active)
Michel Kaempf's avatar
Michel Kaempf committed
203
#
Benoit Steiner's avatar
   
Benoit Steiner committed
204
ifneq ($(OPTIMS),1)
205
206
CFLAGS += -g
endif
Michel Kaempf's avatar
Michel Kaempf committed
207
208
209
210
211
212

#################################################################################
# Objects and files
#################################################################################

#
Vincent Seguin's avatar
Vincent Seguin committed
213
# C Objects
Michel Kaempf's avatar
Michel Kaempf committed
214
# 
Benoit Steiner's avatar
   
Benoit Steiner committed
215
216
217
218
219
INTERFACE =	src/interface/main.o \
		src/interface/interface.o \
		src/interface/intf_msg.o \
		src/interface/intf_cmd.o \
		src/interface/intf_ctrl.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
220
		src/interface/intf_playlist.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
221
		src/interface/intf_channels.o \
Pierre Baillet's avatar
Hurg !    
Pierre Baillet committed
222
223
		src/interface/intf_console.o \
		src/interface/intf_urldecode.o \
Benoit Steiner's avatar
   
Benoit Steiner committed
224

Sam Hocevar's avatar
   
Sam Hocevar committed
225
INPUT =		src/input/input_ext-dec.o \
226
		src/input/input_ext-intf.o \
227
		src/input/input_dec.o \
228
		src/input/input_programs.o \
Henri Fallon's avatar
   
Henri Fallon committed
229
		src/input/input_netlist.o \
230
		src/input/input_clock.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
231
232
		src/input/input.o \
		src/input/mpeg_system.o
Benoit Steiner's avatar
   
Benoit Steiner committed
233

Sam Hocevar's avatar
   
Sam Hocevar committed
234
235
236
237
238
239
AUDIO_OUTPUT = 	src/audio_output/audio_output.o \
		src/audio_output/aout_fifo.o \
		src/audio_output/aout_u8.o \
		src/audio_output/aout_s8.o \
		src/audio_output/aout_u16.o \
		src/audio_output/aout_s16.o
Benoit Steiner's avatar
   
Benoit Steiner committed
240
241
242
243
244
245
246
247
248
249
250
251
252
253

VIDEO_OUTPUT = 	src/video_output/video_output.o \
		src/video_output/video_text.o \
		src/video_output/video_spu.o \
		src/video_output/video_yuv.o

AC3_DECODER =	src/ac3_decoder/ac3_decoder_thread.o \
		src/ac3_decoder/ac3_decoder.o \
		src/ac3_decoder/ac3_parse.o \
		src/ac3_decoder/ac3_exponent.o \
		src/ac3_decoder/ac3_bit_allocate.o \
		src/ac3_decoder/ac3_mantissa.o \
		src/ac3_decoder/ac3_rematrix.o \
		src/ac3_decoder/ac3_imdct.o \
254
255
		src/ac3_decoder/ac3_downmix.o \
		src/ac3_decoder/ac3_downmix_c.o
Benoit Steiner's avatar
   
Benoit Steiner committed
256
257
258
259

LPCM_DECODER =	src/lpcm_decoder/lpcm_decoder_thread.o \
		src/lpcm_decoder/lpcm_decoder.o

Sam Hocevar's avatar
   
Sam Hocevar committed
260
261
262
263
264
AUDIO_DECODER =	src/audio_decoder/audio_decoder.o \
		src/audio_decoder/adec_generic.o \
		src/audio_decoder/adec_layer1.o \
		src/audio_decoder/adec_layer2.o \
		src/audio_decoder/adec_math.o
Benoit Steiner's avatar
   
Benoit Steiner committed
265
266
267
268
269
270
271
272
273
274

SPU_DECODER =	src/spu_decoder/spu_decoder.o

#GEN_DECODER =	src/generic_decoder/generic_decoder.o

VIDEO_PARSER = 	src/video_parser/video_parser.o \
		src/video_parser/vpar_headers.o \
		src/video_parser/vpar_blocks.o \
		src/video_parser/vpar_synchro.o \
		src/video_parser/video_fifo.o
Sam Hocevar's avatar
Sam Hocevar committed
275

Sam Hocevar's avatar
   
Sam Hocevar committed
276
VIDEO_DECODER =	src/video_decoder/video_decoder.o
Benoit Steiner's avatar
   
Benoit Steiner committed
277
278
279
280

MISC =		src/misc/mtime.o \
		src/misc/tests.o \
		src/misc/rsc_files.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
281
		src/misc/modules.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
282
		src/misc/netutils.o
Benoit Steiner's avatar
   
Benoit Steiner committed
283
284
285
286
287
288
289
290
291


C_OBJ =		$(INTERFACE) \
		$(INPUT) \
		$(VIDEO_OUTPUT) \
		$(AUDIO_OUTPUT) \
		$(AC3_DECODER) \
		$(LPCM_DECODER) \
		$(AUDIO_DECODER) \
292
		$(SPU_DECODER) \
Benoit Steiner's avatar
   
Benoit Steiner committed
293
294
295
296
297
		$(GEN_DECODER) \
		$(VIDEO_PARSER) \
		$(VIDEO_DECODER) \
		$(MISC)

Michel Kaempf's avatar
Michel Kaempf committed
298

Benoit Steiner's avatar
   
Benoit Steiner committed
299
300
301
#
# CPP Objects
# 
302
ifeq ($(SYS),beos)
Benoit Steiner's avatar
   
Benoit Steiner committed
303
CPP_OBJ =	src/misc/beos_specific.o
304
305
endif

Vincent Seguin's avatar
Vincent Seguin committed
306
307
308
#
# Assembler Objects
# 
309
310
ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring mmx,$(ARCH)))
311
ASM_OBJ =		
Vincent Seguin's avatar
Vincent Seguin committed
312
endif
313
endif
Vincent Seguin's avatar
Vincent Seguin committed
314

315
316
317
#
# Plugins
#
Sam Hocevar's avatar
   
Sam Hocevar committed
318
319
PLUGIN_ALSA =	plugins/alsa/alsa.o \
		plugins/alsa/aout_alsa.o
Sam Hocevar's avatar
   
Sam Hocevar committed
320

Benoit Steiner's avatar
   
Benoit Steiner committed
321
PLUGIN_BEOS =	plugins/beos/beos.o \
322
		plugins/beos/aout_beos.o \
323
		plugins/beos/intf_beos.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
324
325
326
		plugins/beos/vout_beos.o \
		plugins/beos/DrawingTidbits.o \
		plugins/beos/TransportButton.o
327

Sam Hocevar's avatar
   
Sam Hocevar committed
328
329
330
PLUGIN_DARWIN =	plugins/darwin/darwin.o \
		plugins/darwin/aout_darwin.o

Benoit Steiner's avatar
   
Benoit Steiner committed
331
PLUGIN_DSP =	plugins/dsp/dsp.o \
332
333
		plugins/dsp/aout_dsp.o

Benoit Steiner's avatar
   
Benoit Steiner committed
334
PLUGIN_DUMMY =	plugins/dummy/dummy.o \
335
		plugins/dummy/aout_dummy.o \
336
337
338
		plugins/dummy/intf_dummy.o \
		plugins/dummy/vout_dummy.o

Sam Hocevar's avatar
   
Sam Hocevar committed
339
340
PLUGIN_DVD =	plugins/dvd/dvd.o \
		plugins/dvd/input_dvd.o \
341
		plugins/dvd/dvd_netlist.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
342
		plugins/dvd/dvd_ioctl.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
343
		plugins/dvd/dvd_ifo.o \
344
		plugins/dvd/dvd_udf.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
345
		plugins/dvd/dvd_css.o
Sam Hocevar's avatar
   
Sam Hocevar committed
346

Benoit Steiner's avatar
   
Benoit Steiner committed
347
PLUGIN_ESD =	plugins/esd/esd.o \
348
		plugins/esd/aout_esd.o
349

Benoit Steiner's avatar
   
Benoit Steiner committed
350
PLUGIN_FB =	plugins/fb/fb.o \
351
352
		plugins/fb/vout_fb.o

Benoit Steiner's avatar
   
Benoit Steiner committed
353
PLUGIN_GGI =	plugins/ggi/ggi.o \
354
355
		plugins/ggi/vout_ggi.o

Benoit Steiner's avatar
   
Benoit Steiner committed
356
PLUGIN_GLIDE =	plugins/glide/glide.o \
357
358
		plugins/glide/vout_glide.o

Sam Hocevar's avatar
   
Sam Hocevar committed
359
360
361
362
363
364
PLUGIN_GNOME =	plugins/gnome/gnome.o \
		plugins/gnome/intf_gnome.o \
		plugins/gnome/gnome_callbacks.o \
		plugins/gnome/gnome_interface.o \
		plugins/gnome/gnome_support.o

Sam Hocevar's avatar
   
Sam Hocevar committed
365
366
367
368
PLUGIN_GTK =	plugins/gtk/gtk.o \
		plugins/gtk/intf_gtk.o \
		plugins/gtk/gtk_callbacks.o \
		plugins/gtk/gtk_interface.o \
Pierre Baillet's avatar
Hurg !    
Pierre Baillet committed
369
370
		plugins/gtk/gtk_support.o \
		plugins/gtk/gtk_playlist.o
Sam Hocevar's avatar
   
Sam Hocevar committed
371

Sam Hocevar's avatar
   
Sam Hocevar committed
372
PLUGIN_IDCT =		plugins/idct/idct.o
373

Sam Hocevar's avatar
   
Sam Hocevar committed
374
PLUGIN_IDCTCLASSIC =	plugins/idct/idctclassic.o
Sam Hocevar's avatar
   
Sam Hocevar committed
375

Sam Hocevar's avatar
   
Sam Hocevar committed
376
PLUGIN_IDCTMMX =	plugins/idct/idctmmx.o
Sam Hocevar's avatar
   
Sam Hocevar committed
377

Sam Hocevar's avatar
   
Sam Hocevar committed
378
PLUGIN_IDCTMMXEXT =	plugins/idct/idctmmxext.o
379

Sam Hocevar's avatar
   
Sam Hocevar committed
380
PLUGIN_IDCTALTIVEC =	plugins/idct/idctaltivec.o
381

Sam Hocevar's avatar
   
Sam Hocevar committed
382
PLUGIN_IDCTCOMMON =	plugins/idct/idct_common.o
Sam Hocevar's avatar
   
Sam Hocevar committed
383

Sam Hocevar's avatar
   
Sam Hocevar committed
384
385
PLUGIN_KDE =	plugins/kde/kde.o \
		plugins/kde/intf_kde.o
386

Sam Hocevar's avatar
   
Sam Hocevar committed
387
388
389
390
PLUGIN_MACOSX =	plugins/macosx/macosx.o \
		plugins/macosx/intf_macosx.o \
		plugins/macosx/vout_macosx.o

Sam Hocevar's avatar
   
Sam Hocevar committed
391
392
PLUGIN_MGA =	plugins/mga/mga.o \
		plugins/mga/vout_mga.o
393

Sam Hocevar's avatar
   
Sam Hocevar committed
394
395
PLUGIN_MOTION =		plugins/motion/motion.o \
			plugins/motion/vdec_motion_inner.o
Sam Hocevar's avatar
   
Sam Hocevar committed
396
397
398
399
400
401
402

PLUGIN_MOTIONMMX =	plugins/motion/motionmmx.o \
			plugins/motion/vdec_motion_inner_mmx.o

PLUGIN_MOTIONMMXEXT =	plugins/motion/motionmmxext.o \
			plugins/motion/vdec_motion_inner_mmxext.o

Sam Hocevar's avatar
   
Sam Hocevar committed
403
404
PLUGIN_MOTIONCOMMON =	plugins/motion/vdec_motion_common.o

Sam Hocevar's avatar
   
Sam Hocevar committed
405
406
407
PLUGIN_NCURSES =	plugins/text/ncurses.o \
			plugins/text/intf_ncurses.o

Sam Hocevar's avatar
   
Sam Hocevar committed
408
PLUGIN_NULL =	plugins/null/null.o
Sam Hocevar's avatar
   
Sam Hocevar committed
409

Sam Hocevar's avatar
   
Sam Hocevar committed
410
411
PLUGIN_PS =	plugins/mpeg/ps.o \
		plugins/mpeg/input_ps.o
Sam Hocevar's avatar
   
Sam Hocevar committed
412

Sam Hocevar's avatar
   
Sam Hocevar committed
413
414
415
PLUGIN_QT =	plugins/qt/qt.o \
		plugins/qt/intf_qt.o

Sam Hocevar's avatar
   
Sam Hocevar committed
416
417
418
PLUGIN_SDL =	plugins/sdl/sdl.o \
		plugins/sdl/vout_sdl.o \
		plugins/sdl/aout_sdl.o 
Sam Hocevar's avatar
   
Sam Hocevar committed
419

Sam Hocevar's avatar
   
Sam Hocevar committed
420
421
PLUGIN_TS =	plugins/mpeg/ts.o \
		plugins/mpeg/input_ts.o
422

Sam Hocevar's avatar
   
Sam Hocevar committed
423
424
425
426
PLUGIN_XVIDEO =	plugins/x11/xvideo.o \
		plugins/x11/vout_xvideo.o

PLUGIN_X11 =	plugins/x11/x11.o \
Sam Hocevar's avatar
   
Sam Hocevar committed
427
		plugins/x11/vout_x11.o
Benoit Steiner's avatar
   
Benoit Steiner committed
428

Sam Hocevar's avatar
   
Sam Hocevar committed
429
430
431
432
433
434
435
436
437
438
PLUGIN_YUV =	plugins/yuv/yuv.o \
		plugins/yuv/video_yuv.o \
		plugins/yuv/transforms_yuv.o

PLUGIN_YUVMMX =	plugins/yuv/yuvmmx.o \
		plugins/yuv/video_yuvmmx.o \
		plugins/yuv/transforms_yuvmmx.o

STD_PLUGIN_OBJ = \
		$(PLUGIN_ALSA) \
Sam Hocevar's avatar
   
Sam Hocevar committed
439
		$(PLUGIN_DARWIN) \
Benoit Steiner's avatar
   
Benoit Steiner committed
440
441
		$(PLUGIN_DSP) \
		$(PLUGIN_DUMMY) \
Sam Hocevar's avatar
   
Sam Hocevar committed
442
		$(PLUGIN_DVD) \
Benoit Steiner's avatar
   
Benoit Steiner committed
443
444
445
		$(PLUGIN_ESD) \
		$(PLUGIN_FB) \
		$(PLUGIN_GGI) \
Sam Hocevar's avatar
   
Sam Hocevar committed
446
		$(PLUGIN_IDCT) \
447
		$(PLUGIN_IDCTCLASSIC) \
Sam Hocevar's avatar
   
Sam Hocevar committed
448
		$(PLUGIN_IDCTMMX) \
449
		$(PLUGIN_IDCTMMXEXT) \
Sam Hocevar's avatar
   
Sam Hocevar committed
450
		$(PLUGIN_IDCTCOMMON) \
Sam Hocevar's avatar
   
Sam Hocevar committed
451
		$(PLUGIN_MACOSX) \
Sam Hocevar's avatar
   
Sam Hocevar committed
452
453
454
455
		$(PLUGIN_MGA) \
		$(PLUGIN_MOTION) \
		$(PLUGIN_MOTIONMMX) \
		$(PLUGIN_MOTIONMMXEXT) \
Sam Hocevar's avatar
   
Sam Hocevar committed
456
		$(PLUGIN_MOTIONCOMMON) \
Sam Hocevar's avatar
   
Sam Hocevar committed
457
		$(PLUGIN_NCURSES) \
Sam Hocevar's avatar
   
Sam Hocevar committed
458
459
		$(PLUGIN_NULL) \
		$(PLUGIN_PS) \
Benoit Steiner's avatar
   
Benoit Steiner committed
460
		$(PLUGIN_SDL) \
Sam Hocevar's avatar
   
Sam Hocevar committed
461
462
463
464
		$(PLUGIN_TS) \
		$(PLUGIN_YUV) \
		$(PLUGIN_YUVMMX)

Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
465
NONSTD_PLUGIN_OBJ = \
466
		$(PLUGIN_X11) \
Sam Hocevar's avatar
   
Sam Hocevar committed
467
		$(PLUGIN_XVIDEO) \
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
468
		$(PLUGIN_GLIDE) \
Sam Hocevar's avatar
   
Sam Hocevar committed
469
		$(PLUGIN_GTK) \
470
		$(PLUGIN_GNOME) \
471
		$(PLUGIN_IDCTALTIVEC)
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
472
473

NONSTD_CPP_PLUGIN_OBJ = \
Sam Hocevar's avatar
   
Sam Hocevar committed
474
		$(PLUGIN_BEOS) \
Sam Hocevar's avatar
   
Sam Hocevar committed
475
		$(PLUGIN_QT) \
Sam Hocevar's avatar
   
Sam Hocevar committed
476
		$(PLUGIN_KDE)
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
477

Michel Kaempf's avatar
Michel Kaempf committed
478
479
480
#
# Other lists of files
#
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
481
482
483
484
objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
cdependancies := $(objects:%.o=.dep/%.d)
cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
Michel Kaempf's avatar
Michel Kaempf committed
485
486
487
488
489
490
491
492
493
494
495

# All symbols must be exported
export

################################################################################
# Targets
################################################################################

#
# Virtual targets
#
496
all: vlc @ALIASES@ plugins
Michel Kaempf's avatar
Michel Kaempf committed
497
498

clean:
499
	rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
Sam Hocevar's avatar
   
Sam Hocevar committed
500
	rm -f plugins/*/*.o src/*/*.o lib/*.so
Sam Hocevar's avatar
   
Sam Hocevar committed
501
	rm -f vlc gvlc kvlc qvlc
Michel Kaempf's avatar
Michel Kaempf committed
502
503

distclean: clean
504
	rm -f src/*/*.o plugins/*/*.o **/*~ *.log
505
506
	rm -f Makefile include/defs.h include/config.h
	rm -f config.status config.cache config.log
507
	rm -f gmon.out core build-stamp
508
	rm -rf .dep
509
510

install:
Sam Hocevar's avatar
   
Sam Hocevar committed
511
512
	mkdir -p $(DESTDIR)$(bindir)
	$(INSTALL) vlc $(DESTDIR)$(bindir)
Benoit Steiner's avatar
   
Benoit Steiner committed
513
# ugly
Sam Hocevar's avatar
   
Sam Hocevar committed
514
515
516
517
518
519
	for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
	mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
	$(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
	mkdir -p $(DESTDIR)$(datadir)/videolan
	$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
	$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
Sam Hocevar's avatar
   
Sam Hocevar committed
520
	$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
Michel Kaempf's avatar
Michel Kaempf committed
521

Vincent Seguin's avatar
Vincent Seguin committed
522
show:
523
	@echo CC: $(CC)
524
	@echo CFLAGS: $(CFLAGS)
525
	@echo DCFLAGS: $(DCFLAGS)
526
	@echo LCFLAGS: $(LCFLAGS)
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
527
528
	@echo C_OBJ: $(C_OBJ)
	@echo CPP_OBJ: $(CPP_OBJ)
Sam Hocevar's avatar
   
Sam Hocevar committed
529
	@echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
530
531
532
533
	@echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
	@echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
	@echo objects: $(objects)
	@echo cppobjects: $(cppobjects)
Vincent Seguin's avatar
Vincent Seguin committed
534

Sam Hocevar's avatar
Sam Hocevar committed
535
536
# ugliest of all, but I have no time to do it -- sam
snapshot:
Sam Hocevar's avatar
   
Sam Hocevar committed
537
	rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
Sam Hocevar's avatar
   
Sam Hocevar committed
538
	# copy archive in /tmp
Sam Hocevar's avatar
   
Sam Hocevar committed
539
	find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
Sam Hocevar's avatar
   
Sam Hocevar committed
540
541
		do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
	done
Sam Hocevar's avatar
   
Sam Hocevar committed
542
	find debian -mindepth 1 -maxdepth 1 -type d | \
Sam Hocevar's avatar
   
Sam Hocevar committed
543
		while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
Sam Hocevar's avatar
   
Sam Hocevar committed
544
545
546
547
	# .c .h .in .cpp
	find include src plugins -type f -name '*.[chi]*' | while read i ; \
		do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
	done
548
	# copy misc files
Sam Hocevar's avatar
   
Sam Hocevar committed
549
	cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
Sam Hocevar's avatar
   
Sam Hocevar committed
550
551
552
		Makefile.in Makefile.dep configure configure.in install-sh \
		config.sub config.guess todo.pl \
			/tmp/vlc-@VLC_VERSION@/
Sam Hocevar's avatar
   
Sam Hocevar committed
553
554
555
	for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
		changelog changelog-css rules rules-css vlc.1 vlc.dirs \
		vlc.menu ; do \
556
			cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
Sam Hocevar's avatar
   
Sam Hocevar committed
557
558
559
	for file in default8x16.psf default8x9.psf gvlc.png vlc.png \
		gvlc.xpm vlc.xpm ; do \
			cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
560
561

	# build css-enabled archives
Sam Hocevar's avatar
   
Sam Hocevar committed
562
563
564
565
566
567
	(cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
		bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
			> vlc-@VLC_VERSION@.tar.bz2 ; \
		gzip -f -9 vlc-@VLC_VERSION@.tar )
	mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..

Sam Hocevar's avatar
   
Sam Hocevar committed
568
	# clean up
Sam Hocevar's avatar
   
Sam Hocevar committed
569
	rm -rf /tmp/vlc-@VLC_VERSION@*
Sam Hocevar's avatar
Sam Hocevar committed
570

571
plugins: $(PLUGINS:%=lib/%.so)
Michel Kaempf's avatar
Michel Kaempf committed
572

Benoit Steiner's avatar
   
Benoit Steiner committed
573
FORCE:
574

Sam Hocevar's avatar
Sam Hocevar committed
575
#
Sam Hocevar's avatar
   
Sam Hocevar committed
576
# GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
Sam Hocevar's avatar
Sam Hocevar committed
577
578
# the namespace
#
Sam Hocevar's avatar
   
Sam Hocevar committed
579
gvlc kvlc qvlc: vlc
580
581
	rm -f $@ && ln -s vlc $@

Michel Kaempf's avatar
Michel Kaempf committed
582
583
584
585

#
# Generic rules (see below)
#
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
586
587
588
589
$(cdependancies): %.d: FORCE
	@$(MAKE) -s --no-print-directory -f Makefile.dep $@

$(cppdependancies): %.dpp: FORCE
590
	@$(MAKE) -s --no-print-directory -f Makefile.dep $@
Michel Kaempf's avatar
Michel Kaempf committed
591

592
$(C_OBJ): %.o: Makefile.dep
593
$(C_OBJ): %.o: .dep/%.d
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
594
$(C_OBJ): %.o: %.c
595
	$(CC) $(CFLAGS) -c -o $@ $<
Vincent Seguin's avatar
Vincent Seguin committed
596

Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
597
598
$(CPP_OBJ): %.o: Makefile.dep
$(CPP_OBJ): %.o: .dep/%.dpp
599
$(CPP_OBJ): %.o: %.cpp
600
	$(CC) $(CFLAGS) -c -o $@ $<
601

602
$(ASM_OBJ): %.o: Makefile.dep
Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
603
$(ASM_OBJ): %.o: %.S
604
	$(CC) $(CFLAGS) -c -o $@ $<
Michel Kaempf's avatar
Michel Kaempf committed
605

Benoit Steiner's avatar
   
Benoit Steiner committed
606
607
608
609
610
$(STD_PLUGIN_OBJ): %.o: Makefile.dep
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<

Sam Hocevar's avatar
   
Sam Hocevar committed
611
612
613
614
615
$(PLUGIN_XVIDEO): %.o: Makefile.dep
$(PLUGIN_XVIDEO): %.o: .dep/%.d
$(PLUGIN_XVIDEO): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<

616
617
618
619
620
$(PLUGIN_X11): %.o: Makefile.dep
$(PLUGIN_X11): %.o: .dep/%.d
$(PLUGIN_X11): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<

Sam Hocevar's avatar
   
Sam Hocevar committed
621
622
623
$(PLUGIN_GTK): %.o: Makefile.dep
$(PLUGIN_GTK): %.o: .dep/%.d
$(PLUGIN_GTK): %.o: %.c
Sam Hocevar's avatar
   
Sam Hocevar committed
624
	$(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
Sam Hocevar's avatar
   
Sam Hocevar committed
625

Benoit Steiner's avatar
   
Benoit Steiner committed
626
$(PLUGIN_GNOME): %.o: Makefile.dep
Sam Hocevar's avatar
   
Sam Hocevar committed
627
$(PLUGIN_GNOME): %.o: .dep/%.d
Benoit Steiner's avatar
   
Benoit Steiner committed
628
$(PLUGIN_GNOME): %.o: %.c
Sam Hocevar's avatar
   
Sam Hocevar committed
629
	$(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
Benoit Steiner's avatar
   
Benoit Steiner committed
630
631

$(PLUGIN_GLIDE): %.o: Makefile.dep
Sam Hocevar's avatar
   
Sam Hocevar committed
632
$(PLUGIN_GLIDE): %.o: .dep/%.d
Benoit Steiner's avatar
   
Benoit Steiner committed
633
$(PLUGIN_GLIDE): %.o: %.c
634
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
Benoit Steiner's avatar
   
Benoit Steiner committed
635

Sam Hocevar's avatar
   
Sam Hocevar committed
636
637
638
$(PLUGIN_QT): %.o: Makefile.dep
$(PLUGIN_QT): %.o: .dep/%.dpp
$(PLUGIN_QT): %.o: %.moc
Sam Hocevar's avatar
   
Sam Hocevar committed
639
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
Sam Hocevar's avatar
   
Sam Hocevar committed
640
641
642
$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
	moc -i $< -o $@

Sam Hocevar's avatar
   
Sam Hocevar committed
643
644
$(PLUGIN_KDE): %.o: Makefile.dep
$(PLUGIN_KDE): %.o: .dep/%.dpp
Sam Hocevar's avatar
   
Sam Hocevar committed
645
646
$(PLUGIN_KDE): %.o: %.cpp
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
Sam Hocevar's avatar
   
Sam Hocevar committed
647

Jean-Marc Dressler's avatar
   
Jean-Marc Dressler committed
648
649
650
651
652
$(PLUGIN_BEOS): %.o: Makefile.dep
$(PLUGIN_BEOS): %.o: .dep/%.dpp
$(PLUGIN_BEOS): %.o: %.cpp
	$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<

653
654
655
$(PLUGIN_IDCTALTIVEC): %.o: Makefile.dep
$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
$(PLUGIN_IDCTALTIVEC): %.o: %.c
656
657
	$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< -faltivec

Benoit Steiner's avatar
   
Benoit Steiner committed
658
#
Sam Hocevar's avatar
   
Sam Hocevar committed
659
# Main application target
Benoit Steiner's avatar
   
Benoit Steiner committed
660
#
Sam Hocevar's avatar
   
Sam Hocevar committed
661

Benoit Steiner's avatar
   
Benoit Steiner committed
662
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
Sam Hocevar's avatar
   
Sam Hocevar committed
663
	$(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(LCFLAGS)
Benoit Steiner's avatar
   
Benoit Steiner committed
664
665
666
ifeq ($(SYS),beos)
	rm -f ./plugins/_APP_
	ln -s ../vlc ./plugins/_APP_
Sam Hocevar's avatar
   
Sam Hocevar committed
667
endif
668

Sam Hocevar's avatar
   
Sam Hocevar committed
669
670
671
672
#
# Plugin targets
#

Sam Hocevar's avatar
   
Sam Hocevar committed
673
674
675
lib/alsa.so: $(PLUGIN_ALSA)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lasound

676
lib/beos.so: $(PLUGIN_BEOS)
Sam Hocevar's avatar
   
Sam Hocevar committed
677
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lbe -lgame -lroot -ltracker
678

679
lib/esd.so: $(PLUGIN_ESD)
680
ifneq (,$(findstring bsd,$(SYS)))
Sam Hocevar's avatar
   
Sam Hocevar committed
681
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lesd
682
else
Sam Hocevar's avatar
   
Sam Hocevar committed
683
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -laudiofile -lesd
684
endif
685

Sam Hocevar's avatar
   
Sam Hocevar committed
686
lib/darwin.so: $(PLUGIN_DARWIN)
Sam Hocevar's avatar
   
Sam Hocevar committed
687
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio
Sam Hocevar's avatar
   
Sam Hocevar committed
688

689
lib/dsp.so: $(PLUGIN_DSP)
Sam Hocevar's avatar
   
Sam Hocevar committed
690
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
691

Sam Hocevar's avatar
   
Sam Hocevar committed
692
693
lib/dummy.so: $(PLUGIN_DUMMY)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
694

Sam Hocevar's avatar
   
Sam Hocevar committed
695
696
lib/dvd.so: $(PLUGIN_DVD)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Henri Fallon's avatar
   
Henri Fallon committed
697

698
lib/fb.so: $(PLUGIN_FB)
Sam Hocevar's avatar
   
Sam Hocevar committed
699
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
700

701
lib/ggi.so: $(PLUGIN_GGI)
Sam Hocevar's avatar
   
Sam Hocevar committed
702
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GGI@
703

Sam Hocevar's avatar
   
Sam Hocevar committed
704
lib/glide.so: $(PLUGIN_GLIDE)
Sam Hocevar's avatar
   
Sam Hocevar committed
705
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GLIDE@
Pierre Baillet's avatar
Pierre Baillet committed
706

Sam Hocevar's avatar
   
Sam Hocevar committed
707
708
lib/gnome.so: $(PLUGIN_GNOME)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
Sam Hocevar's avatar
   
Sam Hocevar committed
709

Sam Hocevar's avatar
   
Sam Hocevar committed
710
711
lib/gtk.so: $(PLUGIN_GTK)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gtk-config --libs gtk | sed 's,-rdynamic,,'`
712

Sam Hocevar's avatar
   
Sam Hocevar committed
713
714
lib/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
715

Sam Hocevar's avatar
   
Sam Hocevar committed
716
717
lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
718

Sam Hocevar's avatar
   
Sam Hocevar committed
719
720
lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
721

Sam Hocevar's avatar
   
Sam Hocevar committed
722
723
lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
724

Sam Hocevar's avatar
   
Sam Hocevar committed
725
lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON)
Sam Hocevar's avatar
   
Sam Hocevar committed
726
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework vecLib
727

Sam Hocevar's avatar
   
Sam Hocevar committed
728
729
lib/kde.so: $(PLUGIN_KDE)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lkdeui -lkdecore -lqt -ldl
Sam Hocevar's avatar
   
Sam Hocevar committed
730

Sam Hocevar's avatar
   
Sam Hocevar committed
731
732
lib/macosx.so: $(PLUGIN_MACOSX)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
733

Sam Hocevar's avatar
   
Sam Hocevar committed
734
735
lib/mga.so: $(PLUGIN_MGA)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
Sam Hocevar's avatar
   
Sam Hocevar committed
736

Sam Hocevar's avatar
   
Sam Hocevar committed
737
738
lib/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
739

Sam Hocevar's avatar
   
Sam Hocevar committed
740
741
lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
742

Sam Hocevar's avatar
   
Sam Hocevar committed
743
744
lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
745

Sam Hocevar's avatar
   
Sam Hocevar committed
746
747
lib/ncurses.so: $(PLUGIN_NCURSES)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lncurses
748

749
lib/null.so: $(PLUGIN_NULL)
Sam Hocevar's avatar
   
Sam Hocevar committed
750
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
751

Sam Hocevar's avatar
   
Sam Hocevar committed
752
lib/ps.so: $(PLUGIN_PS)
Sam Hocevar's avatar
   
Sam Hocevar committed
753
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
754

Sam Hocevar's avatar
   
Sam Hocevar committed
755
756
lib/qt.so: $(PLUGIN_QT)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
Sam Hocevar's avatar
   
Sam Hocevar committed
757

Sam Hocevar's avatar
   
Sam Hocevar committed
758
lib/sdl.so: $(PLUGIN_SDL)
Sam Hocevar's avatar
   
Sam Hocevar committed
759
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
Sam Hocevar's avatar
   
Sam Hocevar committed
760

Sam Hocevar's avatar
   
Sam Hocevar committed
761
lib/ts.so: $(PLUGIN_TS)
Sam Hocevar's avatar
   
Sam Hocevar committed
762
763
764
ifeq ($(SYS),darwin)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
else
Sam Hocevar's avatar
   
Sam Hocevar committed
765
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
766
endif
Sam Hocevar's avatar
   
Sam Hocevar committed
767

Sam Hocevar's avatar
   
Sam Hocevar committed
768
769
770
771
772
773
774
lib/xvideo.so: $(PLUGIN_XVIDEO)
ifeq ($(SYS),nto-qnx)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
else
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
endif

Sam Hocevar's avatar
   
Sam Hocevar committed
775
776
777
778
779
780
lib/x11.so: $(PLUGIN_X11)
ifeq ($(SYS),nto-qnx)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
else
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
endif
781

Sam Hocevar's avatar
   
Sam Hocevar committed
782
lib/yuv.so: $(PLUGIN_YUV)
Sam Hocevar's avatar
   
Sam Hocevar committed
783
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
   
Sam Hocevar committed
784
785

lib/yuvmmx.so: $(PLUGIN_YUVMMX)
Sam Hocevar's avatar
   
Sam Hocevar committed
786
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
787

Michel Kaempf's avatar
Michel Kaempf committed
788
789
790
791
792
################################################################################
# Note on generic rules and dependancies
################################################################################

# Note on dependancies: each .c file is associated with a .d file, which
793
794
# depends of it. The .o file associated with a .c file depends of the .d, of the
# .c itself, and of Makefile. The .d files are stored in a separate .dep/
Michel Kaempf's avatar
Michel Kaempf committed
795
796
797
# directory.
# The dep directory should be ignored by CVS.

798
# Note on inclusions: depending of the target, the dependancies files must
Michel Kaempf's avatar
Michel Kaempf committed
799
# or must not be included. The problem is that if we ask make to include a file,
800
801
# and this file does not exist, it is made before it can be included. In a
# general way, a .d file should be included if and only if the corresponding .o
Michel Kaempf's avatar
Michel Kaempf committed
802
803
804
805
806
# needs to be re-made.

# Two makefiles are used: the main one (this one) has regular generic rules,
# except for .o files, for which it calls the object Makefile. Dependancies
# are not included in this file.
Michel Kaempf's avatar
Michel Kaempf committed
807
808
# The object Makefile known how to make a .o from a .c, and includes
# dependancies for the target, but only those required.