Makefile.in 22.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
ifeq ($(SYS),beos)
52
# XXX: beos does not support hostname (how lame...)
53 54 55 56
PROGRAM_BUILD = `date` $(USER)
else
PROGRAM_BUILD = `date` $(USER)@`hostname`
endif
Vincent Seguin's avatar
Vincent Seguin committed
57 58

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

62 63 64 65 66
# 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
67
################################################################################
68
# Tuning and other variables - do not change anything except if you know
Vincent Seguin's avatar
Vincent Seguin committed
69
# exactly what you are doing
Michel Kaempf's avatar
Michel Kaempf committed
70 71 72 73 74
################################################################################

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

Michel Kaempf's avatar
Michel Kaempf committed
78 79 80
#
# Libraries
#
Sam Hocevar's avatar
 
Sam Hocevar committed
81
LIB = @LIB@ -L/usr/local/lib
82

83
ifeq ($(SYS),beos)
84 85
LIB += -lbe -lroot -lgame
else
86
LIB += -lm
87
endif
88

Michel Kaempf's avatar
Michel Kaempf committed
89
#
Benoit Steiner's avatar
 
Benoit Steiner committed
90
# C compiler flags: mainstream compilation
Michel Kaempf's avatar
Michel Kaempf committed
91
#
92 93 94 95
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
CFLAGS += -D_REENTRANT
CFLAGS += -D_GNU_SOURCE
Michel Kaempf's avatar
Michel Kaempf committed
96

97
# flags needed for clean beos compilation
Sam Hocevar's avatar
Sam Hocevar committed
98
ifeq ($(SYS),beos)
99
CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
Sam Hocevar's avatar
Sam Hocevar committed
100
endif
101

102 103 104 105
ifneq (,$(findstring darwin,$(SYS)))
CFLAGS += -traditional-cpp
endif

Michel Kaempf's avatar
Michel Kaempf committed
106
# Optimizations : don't compile debug versions with them
107
ifeq ($(OPTIMS),1)
108 109
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
110
CFLAGS += -fomit-frame-pointer
111

112
# Optimizations for x86 familiy
113
ifneq (,$(findstring 86,$(ARCH)))
114
# Optional Pentium Pro optimizations
115
ifneq (,$(findstring ppro,$(ARCH)))
116
CFLAGS += -march=pentiumpro -mcpu=pentiumpro
117
else
118
CFLAGS += -march=pentium -mcpu=pentium
119
endif
Vincent Seguin's avatar
Vincent Seguin committed
120
endif
121

Vincent Seguin's avatar
Vincent Seguin committed
122
# Optimizations for PowerPC
123
ifneq (,$(findstring powerpc,$(ARCH)))
124
CFLAGS += -mmultiple -mhard-float -mstring
Vincent Seguin's avatar
Vincent Seguin committed
125
endif
Michel Kaempf's avatar
Michel Kaempf committed
126

127
# Optimizations for Sparc
128
ifneq (,$(findstring sparc,$(ARCH)))
129
CFLAGS += -mhard-float
130 131
endif

Benoit Steiner's avatar
 
Benoit Steiner committed
132
#end of optimisations
133 134
endif

135
# Optional MMX optimizations for x86
136 137
ifneq (,$(findstring mmx,$(ARCH)))
CFLAGS += -DHAVE_MMX
138 139
endif

Benoit Steiner's avatar
 
Benoit Steiner committed
140 141 142
#
# C compiler flags: plugin compilation
#
Sam Hocevar's avatar
 
Sam Hocevar committed
143 144 145 146 147
PCFLAGS += -fPIC

#
# C compiler flags: plugin linking
#
148
ifneq (,$(findstring darwin,$(SYS)))
Sam Hocevar's avatar
 
Sam Hocevar committed
149 150 151 152
PLCFLAGS += -bundle -undefined suppress
else
ifeq ($(SYS),beos)
PLCFLAGS += -nostart plugins/_APP_
153 154 155
else
PLCFLAGS += -shared
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
156
endif
157

Michel Kaempf's avatar
Michel Kaempf committed
158 159 160 161 162 163 164 165 166
#
# C compiler flags: dependancies
#
DCFLAGS += $(INCLUDE)
DCFLAGS += -MM

#
# C compiler flags: linking
#
Sam Hocevar's avatar
 
Sam Hocevar committed
167
LCFLAGS += @LCFLAGS@ $(LIB)
Michel Kaempf's avatar
Michel Kaempf committed
168
LCFLAGS += -Wall
Vincent Seguin's avatar
Vincent Seguin committed
169
#LCFLAGS += -s
Michel Kaempf's avatar
Michel Kaempf committed
170

Sam Hocevar's avatar
 
Sam Hocevar committed
171 172 173 174 175 176 177 178 179
ifeq ($(SYS),beos)
LCFLAGS += -Xlinker -soname=_APP_
else
ifneq (,$(findstring qnx,$(SYS)))
LCFLAGS += -Xlinker -export-dynamic
else
ifneq (,$(findstring darwin,$(SYS)))
LCFLAGS += -dyn
else
Sam Hocevar's avatar
 
Sam Hocevar committed
180
LCFLAGS += --export-dynamic
Sam Hocevar's avatar
 
Sam Hocevar committed
181 182 183 184
endif
endif
endif

Michel Kaempf's avatar
Michel Kaempf committed
185
#
Benoit Steiner's avatar
 
Benoit Steiner committed
186
# Debugging and profiling support (unless optimisations are active)
Michel Kaempf's avatar
Michel Kaempf committed
187
#
Benoit Steiner's avatar
 
Benoit Steiner committed
188
ifneq ($(OPTIMS),1)
189 190
CFLAGS += -g
endif
Michel Kaempf's avatar
Michel Kaempf committed
191 192 193 194 195 196

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

#
Vincent Seguin's avatar
Vincent Seguin committed
197
# C Objects
Michel Kaempf's avatar
Michel Kaempf committed
198
# 
Benoit Steiner's avatar
 
Benoit Steiner committed
199 200 201 202 203
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
204
		src/interface/intf_playlist.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
205
		src/interface/intf_channels.o \
Pierre Baillet's avatar
Hurg !  
Pierre Baillet committed
206 207
		src/interface/intf_console.o \
		src/interface/intf_urldecode.o \
Benoit Steiner's avatar
 
Benoit Steiner committed
208

Sam Hocevar's avatar
 
Sam Hocevar committed
209
INPUT =		src/input/input_ext-dec.o \
210
		src/input/input_ext-intf.o \
211
		src/input/input_dec.o \
212
		src/input/input_programs.o \
Henri Fallon's avatar
 
Henri Fallon committed
213
		src/input/input_netlist.o \
214
		src/input/input_clock.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
215 216
		src/input/input.o \
		src/input/mpeg_system.o
Benoit Steiner's avatar
 
Benoit Steiner committed
217

Sam Hocevar's avatar
 
Sam Hocevar committed
218 219 220 221 222 223
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
224 225 226 227 228 229 230 231 232 233 234 235 236 237

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 \
238 239
		src/ac3_decoder/ac3_downmix.o \
		src/ac3_decoder/ac3_downmix_c.o
Benoit Steiner's avatar
 
Benoit Steiner committed
240 241 242 243

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

Sam Hocevar's avatar
 
Sam Hocevar committed
244 245 246 247 248
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
249 250 251 252 253 254 255 256 257 258

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
259

Sam Hocevar's avatar
 
Sam Hocevar committed
260
VIDEO_DECODER =	src/video_decoder/video_decoder.o
Benoit Steiner's avatar
 
Benoit Steiner committed
261 262 263 264

MISC =		src/misc/mtime.o \
		src/misc/tests.o \
		src/misc/rsc_files.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
265
		src/misc/modules.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
266
		src/misc/netutils.o
Benoit Steiner's avatar
 
Benoit Steiner committed
267 268 269 270 271 272 273 274

C_OBJ =		$(INTERFACE) \
		$(INPUT) \
		$(VIDEO_OUTPUT) \
		$(AUDIO_OUTPUT) \
		$(AC3_DECODER) \
		$(LPCM_DECODER) \
		$(AUDIO_DECODER) \
275
		$(SPU_DECODER) \
Benoit Steiner's avatar
 
Benoit Steiner committed
276 277 278
		$(GEN_DECODER) \
		$(VIDEO_PARSER) \
		$(VIDEO_DECODER) \
Sam Hocevar's avatar
 
Sam Hocevar committed
279 280
		$(MISC) \
		@GETOPT@
Benoit Steiner's avatar
 
Benoit Steiner committed
281

Michel Kaempf's avatar
Michel Kaempf committed
282

Benoit Steiner's avatar
 
Benoit Steiner committed
283 284 285
#
# CPP Objects
# 
286
ifeq ($(SYS),beos)
Benoit Steiner's avatar
 
Benoit Steiner committed
287
CPP_OBJ =	src/misc/beos_specific.o
288 289
endif

Vincent Seguin's avatar
Vincent Seguin committed
290 291 292
#
# Assembler Objects
# 
293 294
ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring mmx,$(ARCH)))
295
ASM_OBJ =		
Vincent Seguin's avatar
Vincent Seguin committed
296
endif
297
endif
Vincent Seguin's avatar
Vincent Seguin committed
298

299 300 301
#
# Plugins
#
Sam Hocevar's avatar
 
Sam Hocevar committed
302 303
PLUGIN_ALSA =	plugins/alsa/alsa.o \
		plugins/alsa/aout_alsa.o
Sam Hocevar's avatar
 
Sam Hocevar committed
304

Benoit Steiner's avatar
 
Benoit Steiner committed
305
PLUGIN_BEOS =	plugins/beos/beos.o \
306
		plugins/beos/aout_beos.o \
307
		plugins/beos/intf_beos.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
308 309 310
		plugins/beos/vout_beos.o \
		plugins/beos/DrawingTidbits.o \
		plugins/beos/TransportButton.o
311

312
PLUGIN_DARWIN =	plugins/darwin/darwin.o
Sam Hocevar's avatar
 
Sam Hocevar committed
313

Benoit Steiner's avatar
 
Benoit Steiner committed
314
PLUGIN_DSP =	plugins/dsp/dsp.o \
315 316
		plugins/dsp/aout_dsp.o

Benoit Steiner's avatar
 
Benoit Steiner committed
317
PLUGIN_DUMMY =	plugins/dummy/dummy.o \
318
		plugins/dummy/aout_dummy.o \
319 320 321
		plugins/dummy/intf_dummy.o \
		plugins/dummy/vout_dummy.o

Sam Hocevar's avatar
 
Sam Hocevar committed
322 323
PLUGIN_DVD =	plugins/dvd/dvd.o \
		plugins/dvd/input_dvd.o \
324
		plugins/dvd/dvd_netlist.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
325
		plugins/dvd/dvd_ioctl.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
326
		plugins/dvd/dvd_ifo.o \
327
		plugins/dvd/dvd_udf.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
328
		plugins/dvd/dvd_css.o
Sam Hocevar's avatar
 
Sam Hocevar committed
329

Benoit Steiner's avatar
 
Benoit Steiner committed
330
PLUGIN_ESD =	plugins/esd/esd.o \
331
		plugins/esd/aout_esd.o
332

Benoit Steiner's avatar
 
Benoit Steiner committed
333
PLUGIN_FB =	plugins/fb/fb.o \
334 335
		plugins/fb/vout_fb.o

Benoit Steiner's avatar
 
Benoit Steiner committed
336
PLUGIN_GGI =	plugins/ggi/ggi.o \
337 338
		plugins/ggi/vout_ggi.o

Benoit Steiner's avatar
 
Benoit Steiner committed
339
PLUGIN_GLIDE =	plugins/glide/glide.o \
340 341
		plugins/glide/vout_glide.o

Sam Hocevar's avatar
 
Sam Hocevar committed
342 343 344 345 346 347
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
348 349 350 351
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
352 353
		plugins/gtk/gtk_support.o \
		plugins/gtk/gtk_playlist.o
Sam Hocevar's avatar
 
Sam Hocevar committed
354

Sam Hocevar's avatar
 
Sam Hocevar committed
355
PLUGIN_IDCT =		plugins/idct/idct.o
356

Sam Hocevar's avatar
 
Sam Hocevar committed
357
PLUGIN_IDCTCLASSIC =	plugins/idct/idctclassic.o
Sam Hocevar's avatar
 
Sam Hocevar committed
358

Sam Hocevar's avatar
 
Sam Hocevar committed
359
PLUGIN_IDCTMMX =	plugins/idct/idctmmx.o
Sam Hocevar's avatar
 
Sam Hocevar committed
360

Sam Hocevar's avatar
 
Sam Hocevar committed
361
PLUGIN_IDCTMMXEXT =	plugins/idct/idctmmxext.o
362

Sam Hocevar's avatar
 
Sam Hocevar committed
363
PLUGIN_IDCTALTIVEC =	plugins/idct/idctaltivec.o
364

Sam Hocevar's avatar
 
Sam Hocevar committed
365
PLUGIN_IDCTCOMMON =	plugins/idct/idct_common.o
Sam Hocevar's avatar
 
Sam Hocevar committed
366

Sam Hocevar's avatar
 
Sam Hocevar committed
367 368
PLUGIN_KDE =	plugins/kde/kde.o \
		plugins/kde/intf_kde.o
369

Sam Hocevar's avatar
 
Sam Hocevar committed
370 371
PLUGIN_MACOSX =	plugins/macosx/macosx.o \
		plugins/macosx/intf_macosx.o \
372
		plugins/macosx/aout_macosx.o \
Sam Hocevar's avatar
 
Sam Hocevar committed
373 374
		plugins/macosx/vout_macosx.o

Sam Hocevar's avatar
 
Sam Hocevar committed
375 376
PLUGIN_MGA =	plugins/mga/mga.o \
		plugins/mga/vout_mga.o
377

Sam Hocevar's avatar
 
Sam Hocevar committed
378 379
PLUGIN_MOTION =		plugins/motion/motion.o \
			plugins/motion/vdec_motion_inner.o
Sam Hocevar's avatar
 
Sam Hocevar committed
380 381 382 383 384 385 386

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
387 388
PLUGIN_MOTIONCOMMON =	plugins/motion/vdec_motion_common.o

Sam Hocevar's avatar
 
Sam Hocevar committed
389 390 391
PLUGIN_NCURSES =	plugins/text/ncurses.o \
			plugins/text/intf_ncurses.o

Sam Hocevar's avatar
 
Sam Hocevar committed
392
PLUGIN_NULL =	plugins/null/null.o
Sam Hocevar's avatar
 
Sam Hocevar committed
393

Sam Hocevar's avatar
 
Sam Hocevar committed
394 395
PLUGIN_PS =	plugins/mpeg/ps.o \
		plugins/mpeg/input_ps.o
Sam Hocevar's avatar
 
Sam Hocevar committed
396

Sam Hocevar's avatar
 
Sam Hocevar committed
397 398 399
PLUGIN_QT =	plugins/qt/qt.o \
		plugins/qt/intf_qt.o

Sam Hocevar's avatar
 
Sam Hocevar committed
400 401 402
PLUGIN_SDL =	plugins/sdl/sdl.o \
		plugins/sdl/vout_sdl.o \
		plugins/sdl/aout_sdl.o 
Sam Hocevar's avatar
 
Sam Hocevar committed
403

Sam Hocevar's avatar
 
Sam Hocevar committed
404 405
PLUGIN_TS =	plugins/mpeg/ts.o \
		plugins/mpeg/input_ts.o
406

Sam Hocevar's avatar
 
Sam Hocevar committed
407 408 409 410
PLUGIN_XVIDEO =	plugins/x11/xvideo.o \
		plugins/x11/vout_xvideo.o

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

Sam Hocevar's avatar
 
Sam Hocevar committed
413 414 415 416 417 418 419 420 421 422
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
423
		$(PLUGIN_DARWIN) \
Benoit Steiner's avatar
 
Benoit Steiner committed
424 425
		$(PLUGIN_DSP) \
		$(PLUGIN_DUMMY) \
Sam Hocevar's avatar
 
Sam Hocevar committed
426
		$(PLUGIN_DVD) \
Benoit Steiner's avatar
 
Benoit Steiner committed
427 428 429
		$(PLUGIN_ESD) \
		$(PLUGIN_FB) \
		$(PLUGIN_GGI) \
Sam Hocevar's avatar
 
Sam Hocevar committed
430
		$(PLUGIN_IDCT) \
431
		$(PLUGIN_IDCTCLASSIC) \
Sam Hocevar's avatar
 
Sam Hocevar committed
432
		$(PLUGIN_IDCTMMX) \
433
		$(PLUGIN_IDCTMMXEXT) \
Sam Hocevar's avatar
 
Sam Hocevar committed
434
		$(PLUGIN_IDCTCOMMON) \
Sam Hocevar's avatar
 
Sam Hocevar committed
435 436 437 438
		$(PLUGIN_MGA) \
		$(PLUGIN_MOTION) \
		$(PLUGIN_MOTIONMMX) \
		$(PLUGIN_MOTIONMMXEXT) \
Sam Hocevar's avatar
 
Sam Hocevar committed
439
		$(PLUGIN_MOTIONCOMMON) \
Sam Hocevar's avatar
 
Sam Hocevar committed
440
		$(PLUGIN_NCURSES) \
Sam Hocevar's avatar
 
Sam Hocevar committed
441 442
		$(PLUGIN_NULL) \
		$(PLUGIN_PS) \
Benoit Steiner's avatar
 
Benoit Steiner committed
443
		$(PLUGIN_SDL) \
Sam Hocevar's avatar
 
Sam Hocevar committed
444 445 446 447
		$(PLUGIN_TS) \
		$(PLUGIN_YUV) \
		$(PLUGIN_YUVMMX)

Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
448
NONSTD_PLUGIN_OBJ = \
449
		$(PLUGIN_X11) \
Sam Hocevar's avatar
 
Sam Hocevar committed
450
		$(PLUGIN_XVIDEO) \
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
451
		$(PLUGIN_GLIDE) \
Sam Hocevar's avatar
 
Sam Hocevar committed
452
		$(PLUGIN_GTK) \
453
		$(PLUGIN_GNOME) \
454
		$(PLUGIN_MACOSX) \
455
		$(PLUGIN_IDCTALTIVEC)
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
456 457

NONSTD_CPP_PLUGIN_OBJ = \
Sam Hocevar's avatar
 
Sam Hocevar committed
458
		$(PLUGIN_BEOS) \
Sam Hocevar's avatar
 
Sam Hocevar committed
459
		$(PLUGIN_QT) \
Sam Hocevar's avatar
 
Sam Hocevar committed
460
		$(PLUGIN_KDE)
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
461

Michel Kaempf's avatar
Michel Kaempf committed
462 463 464
#
# Other lists of files
#
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
465 466 467 468
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
469 470 471 472 473 474 475 476 477 478 479

# All symbols must be exported
export

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

#
# Virtual targets
#
480
all: vlc @ALIASES@ plugins
Michel Kaempf's avatar
Michel Kaempf committed
481 482

clean:
483
	rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
Sam Hocevar's avatar
 
Sam Hocevar committed
484 485
	rm -f plugins/*/*.o plugins/*/*.moc plugins/*/*.bak
	rm -f src/*/*.o extras/*/*.o
Sam Hocevar's avatar
 
Sam Hocevar committed
486
	rm -f lib/*.so vlc gnome-vlc gvlc kvlc qvlc
Michel Kaempf's avatar
Michel Kaempf committed
487 488

distclean: clean
Sam Hocevar's avatar
 
Sam Hocevar committed
489
	rm -f **/*.o **/*~ *.log
490 491
	rm -f Makefile include/defs.h include/config.h
	rm -f config.status config.cache config.log
492
	rm -f gmon.out core build-stamp
Sam Hocevar's avatar
 
Sam Hocevar committed
493
	rm -Rf .dep
494 495

install:
Sam Hocevar's avatar
 
Sam Hocevar committed
496 497
	mkdir -p $(DESTDIR)$(bindir)
	$(INSTALL) vlc $(DESTDIR)$(bindir)
Benoit Steiner's avatar
 
Benoit Steiner committed
498
# ugly
Sam Hocevar's avatar
 
Sam Hocevar committed
499 500 501 502 503 504
	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
505
	$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
Michel Kaempf's avatar
Michel Kaempf committed
506

507 508 509
ifneq (,$(findstring darwin,$(SYS)))
# XXX this should only be for MacOS X
#should the following be "$(DESTDIR)$(bindir)vlc.app/" or "$(DESTDIR)vlc.app/" ?
Sam Hocevar's avatar
 
Sam Hocevar committed
510 511 512 513 514 515 516 517
	mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS
	mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
	mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
	$(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist $(DESTDIR)$(bindir)vlc.app/Contents/
	$(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo $(DESTDIR)$(bindir)vlc.app/Contents/
	$(INSTALL) vlc $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/
	$(INSTALL) $(PLUGINS:%=lib/%.so) $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
	$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
518 519
endif

Vincent Seguin's avatar
Vincent Seguin committed
520
show:
521
	@echo CC: $(CC)
522
	@echo CFLAGS: $(CFLAGS)
523
	@echo DCFLAGS: $(DCFLAGS)
524
	@echo LCFLAGS: $(LCFLAGS)
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
525 526
	@echo C_OBJ: $(C_OBJ)
	@echo CPP_OBJ: $(CPP_OBJ)
Sam Hocevar's avatar
 
Sam Hocevar committed
527
	@echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
528 529 530 531
	@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
532

Sam Hocevar's avatar
Sam Hocevar committed
533 534
# ugliest of all, but I have no time to do it -- sam
snapshot:
Sam Hocevar's avatar
 
Sam Hocevar committed
535
	rm -Rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
Sam Hocevar's avatar
 
Sam Hocevar committed
536
	# copy archive in /tmp
Sam Hocevar's avatar
 
Sam Hocevar committed
537
	find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
Sam Hocevar's avatar
 
Sam Hocevar committed
538 539
		do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
	done
Sam Hocevar's avatar
 
Sam Hocevar committed
540
	find debian -mindepth 1 -maxdepth 1 -type d | \
Sam Hocevar's avatar
 
Sam Hocevar committed
541
		while read i ; do rm -Rf /tmp/vlc-@VLC_VERSION@/$$i ; done
Sam Hocevar's avatar
 
Sam Hocevar committed
542 543 544 545
	# .c .h .in .cpp
	find include src plugins -type f -name '*.[chi]*' | while read i ; \
		do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
	done
Sam Hocevar's avatar
 
Sam Hocevar committed
546 547 548 549 550 551 552
	# extra files
	cp -a extras/* /tmp/vlc-@VLC_VERSION@/extras
	cp -a doc/* /tmp/vlc-@VLC_VERSION@/doc
	find /tmp/vlc-@VLC_VERSION@/extras /tmp/vlc-@VLC_VERSION@/doc \
		-type d -name CVS | while read i ; \
			do rm -Rf $$i ; \
		done
553
	# copy misc files
Sam Hocevar's avatar
 
Sam Hocevar committed
554
	cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
Sam Hocevar's avatar
 
Sam Hocevar committed
555 556 557
		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
558
	for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
Sam Hocevar's avatar
 
Sam Hocevar committed
559
		changelog changelog-css rules rules-css vlc.dirs \
Sam Hocevar's avatar
 
Sam Hocevar committed
560
		vlc.menu ; do \
561
			cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
Sam Hocevar's avatar
 
Sam Hocevar committed
562 563 564 565 566
	for file in default8x16.psf default8x9.psf ; do \
		cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
	for icon in vlc gvlc qvlc gnome-vlc ; do \
		cp share/$$icon.xpm share/$$icon.png \
			/tmp/vlc-@VLC_VERSION@/share/ ; done
567 568

	# build css-enabled archives
Sam Hocevar's avatar
 
Sam Hocevar committed
569 570 571 572 573 574
	(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
575
	# clean up
Sam Hocevar's avatar
 
Sam Hocevar committed
576
	rm -Rf /tmp/vlc-@VLC_VERSION@*
Sam Hocevar's avatar
Sam Hocevar committed
577

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

Benoit Steiner's avatar
 
Benoit Steiner committed
580
FORCE:
581

Sam Hocevar's avatar
Sam Hocevar committed
582
#
Sam Hocevar's avatar
 
Sam Hocevar committed
583
# GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
Sam Hocevar's avatar
Sam Hocevar committed
584 585
# the namespace
#
Sam Hocevar's avatar
 
Sam Hocevar committed
586
gnome-vlc gvlc kvlc qvlc: vlc
587 588
	rm -f $@ && ln -s vlc $@

Michel Kaempf's avatar
Michel Kaempf committed
589 590 591 592

#
# Generic rules (see below)
#
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
593 594 595 596
$(cdependancies): %.d: FORCE
	@$(MAKE) -s --no-print-directory -f Makefile.dep $@

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

599
$(C_OBJ): %.o: Makefile.dep
600
$(C_OBJ): %.o: .dep/%.d
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
601
$(C_OBJ): %.o: %.c
602 603 604 605
ifneq (,$(findstring darwin,$(SYS)))
#this is uglier of all
	@if test "src/ac3_decoder/ac3_imdct.c" = "$<"; then $(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<; echo "(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<"; else $(CC) $(CFLAGS) -c -o $@ $<; echo "$(CC) $(CFLAGS) -c -o $@ $<"; fi
else
606
	$(CC) $(CFLAGS) -c -o $@ $<
607
endif
Vincent Seguin's avatar
Vincent Seguin committed
608

Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
609 610
$(CPP_OBJ): %.o: Makefile.dep
$(CPP_OBJ): %.o: .dep/%.dpp
611
$(CPP_OBJ): %.o: %.cpp
612
	$(CC) $(CFLAGS) -c -o $@ $<
613

614
$(ASM_OBJ): %.o: Makefile.dep
Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
615
$(ASM_OBJ): %.o: %.S
616
	$(CC) $(CFLAGS) -c -o $@ $<
Michel Kaempf's avatar
Michel Kaempf committed
617

Benoit Steiner's avatar
 
Benoit Steiner committed
618 619 620 621 622
$(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
623 624 625 626 627
$(PLUGIN_XVIDEO): %.o: Makefile.dep
$(PLUGIN_XVIDEO): %.o: .dep/%.d
$(PLUGIN_XVIDEO): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<

628 629 630 631 632
$(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
633 634 635
$(PLUGIN_GTK): %.o: Makefile.dep
$(PLUGIN_GTK): %.o: .dep/%.d
$(PLUGIN_GTK): %.o: %.c
Sam Hocevar's avatar
 
Sam Hocevar committed
636
	$(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
Sam Hocevar's avatar
 
Sam Hocevar committed
637

Benoit Steiner's avatar
 
Benoit Steiner committed
638
$(PLUGIN_GNOME): %.o: Makefile.dep
Sam Hocevar's avatar
 
Sam Hocevar committed
639
$(PLUGIN_GNOME): %.o: .dep/%.d
Benoit Steiner's avatar
 
Benoit Steiner committed
640
$(PLUGIN_GNOME): %.o: %.c
Sam Hocevar's avatar
 
Sam Hocevar committed
641
	$(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
Benoit Steiner's avatar
 
Benoit Steiner committed
642 643

$(PLUGIN_GLIDE): %.o: Makefile.dep
Sam Hocevar's avatar
 
Sam Hocevar committed
644
$(PLUGIN_GLIDE): %.o: .dep/%.d
Benoit Steiner's avatar
 
Benoit Steiner committed
645
$(PLUGIN_GLIDE): %.o: %.c
646
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
Benoit Steiner's avatar
 
Benoit Steiner committed
647

Sam Hocevar's avatar
 
Sam Hocevar committed
648 649 650
$(PLUGIN_QT): %.o: Makefile.dep
$(PLUGIN_QT): %.o: .dep/%.dpp
$(PLUGIN_QT): %.o: %.moc
Sam Hocevar's avatar
 
Sam Hocevar committed
651
	$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
Sam Hocevar's avatar
 
Sam Hocevar committed
652 653 654
$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
	moc -i $< -o $@

Sam Hocevar's avatar
 
Sam Hocevar committed
655 656
$(PLUGIN_KDE): %.o: Makefile.dep
$(PLUGIN_KDE): %.o: .dep/%.dpp
Sam Hocevar's avatar
 
Sam Hocevar committed
657 658
$(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
659

Jean-Marc Dressler's avatar
 
Jean-Marc Dressler committed
660 661 662 663 664
$(PLUGIN_BEOS): %.o: Makefile.dep
$(PLUGIN_BEOS): %.o: .dep/%.dpp
$(PLUGIN_BEOS): %.o: %.cpp
	$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<

665 666 667
$(PLUGIN_IDCTALTIVEC): %.o: Makefile.dep
$(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
$(PLUGIN_IDCTALTIVEC): %.o: %.c
668 669 670 671 672 673
	$(CC) $(CFLAGS) $(PCFLAGS) -faltivec -c -o $@ $<

$(PLUGIN_MACOSX): %.o: Makefile.dep
$(PLUGIN_MACOSX): %.o: .dep/%.d
$(PLUGIN_MACOSX): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
674

Benoit Steiner's avatar
 
Benoit Steiner committed
675
#
Sam Hocevar's avatar
 
Sam Hocevar committed
676
# Main application target
Benoit Steiner's avatar
 
Benoit Steiner committed
677
#
Sam Hocevar's avatar
 
Sam Hocevar committed
678

Benoit Steiner's avatar
 
Benoit Steiner committed
679
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
Sam Hocevar's avatar
 
Sam Hocevar committed
680
	$(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(LCFLAGS)
Benoit Steiner's avatar
 
Benoit Steiner committed
681 682 683
ifeq ($(SYS),beos)
	rm -f ./plugins/_APP_
	ln -s ../vlc ./plugins/_APP_
Sam Hocevar's avatar
 
Sam Hocevar committed
684
endif
685

686 687
vlc.app: all
ifneq (,$(findstring darwin,$(SYS)))
Sam Hocevar's avatar
 
Sam Hocevar committed
688 689 690 691 692 693 694 695
	mkdir -p vlc.app/Contents/MacOS
	mkdir -p vlc.app/Contents/MacOS/lib
	mkdir -p vlc.app/Contents/MacOS/share
	$(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
	$(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
	$(INSTALL) vlc vlc.app/Contents/MacOS/
	$(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
	$(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
696 697
endif

Sam Hocevar's avatar
 
Sam Hocevar committed
698 699 700 701
#
# Plugin targets
#

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

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

708
lib/esd.so: $(PLUGIN_ESD)
709
ifneq (,$(findstring bsd,$(SYS)))
Sam Hocevar's avatar
 
Sam Hocevar committed
710
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lesd
711
else
Sam Hocevar's avatar
 
Sam Hocevar committed
712
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -laudiofile -lesd
713
endif
714

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

718
lib/dsp.so: $(PLUGIN_DSP)
Sam Hocevar's avatar
 
Sam Hocevar committed
719
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
 
Sam Hocevar committed
720

Sam Hocevar's avatar
 
Sam Hocevar committed
721 722
lib/dummy.so: $(PLUGIN_DUMMY)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
 
Sam Hocevar committed
723

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

727
lib/fb.so: $(PLUGIN_FB)
Sam Hocevar's avatar
 
Sam Hocevar committed
728
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
729

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

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

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

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

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

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

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

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

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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
760
lib/macosx.so: $(PLUGIN_MACOSX)
761
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio -framework Carbon -framework AGL
Sam Hocevar's avatar
 
Sam Hocevar committed
762

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

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

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

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

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

778
lib/null.so: $(PLUGIN_NULL)
Sam Hocevar's avatar
 
Sam Hocevar committed
779
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
780

Sam Hocevar's avatar
 
Sam Hocevar committed
781
lib/ps.so: $(PLUGIN_PS)
Sam Hocevar's avatar
 
Sam Hocevar committed
782
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
 
Sam Hocevar committed
783

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

Sam Hocevar's avatar
 
Sam Hocevar committed
787
lib/sdl.so: $(PLUGIN_SDL)
788 789 790
ifneq (,$(findstring darwin,$(SYS)))
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@ -framework Carbon -framework AGL
else
Sam Hocevar's avatar
 
Sam Hocevar committed
791
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
792
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
793

Sam Hocevar's avatar
 
Sam Hocevar committed
794
lib/ts.so: $(PLUGIN_TS)
795
ifneq (,$(findstring darwin,$(SYS)))
Sam Hocevar's avatar
 
Sam Hocevar committed
796 797
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
else
Sam Hocevar's avatar
 
Sam Hocevar committed
798
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
 
Sam Hocevar committed
799
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
800

Sam Hocevar's avatar
 
Sam Hocevar committed
801 802 803 804 805 806 807
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
808 809 810 811 812 813
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
814

Sam Hocevar's avatar
 
Sam Hocevar committed
815
lib/yuv.so: $(PLUGIN_YUV)
Sam Hocevar's avatar
 
Sam Hocevar committed
816
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
Sam Hocevar's avatar
 
Sam Hocevar committed
817 818

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

Michel Kaempf's avatar
Michel Kaempf committed
821 822 823 824 825
################################################################################
# Note on generic rules and dependancies
################################################################################

# Note on dependancies: each .c file is associated with a .d file, which
826 827
# 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
828 829 830
# directory.
# The dep directory should be ignored by CVS.

831
# Note on inclusions: depending of the target, the dependancies files must