File: Makefile

package info (click to toggle)
mpg123 1.33.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,428 kB
  • sloc: ansic: 55,507; asm: 17,309; sh: 4,795; makefile: 156; perl: 153; python: 45
file content (66 lines) | stat: -rw-r--r-- 2,060 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
targets = \
  feedseek \
  mpg123_to_out123 \
  mpg123_to_wav_replaced_io \
  mpg123_to_wav_reader64 \
  scan \
  id3dump \
  mpglib \
  dump_seekindex \
  extract_frames

all: $(targets)

# On largefile-aware systems you might want to use these instead:
#MPG123_CFLAGS  := $(shell pkg-config --cflags libmpg123_64)
#MPG123_LDFLAGS := $(shell pkg-config --libs   libmpg123_64)
# This works on sane setups where off_t is off_t, and just that.
ifeq ($(MPG123_PREFIX),)
  MPG123_CFLAGS  := $(shell pkg-config --cflags libmpg123)
  MPG123_LDFLAGS := $(shell pkg-config --libs   libmpg123)
  OUT123_CFLAGS  := $(shell pkg-config --cflags libout123)
  OUT123_LDFLAGS := $(shell pkg-config --libs   libout123)
else # Yeah, that's with GNU/Linux in mind, at least GNU ld ...
  MPG123_CFLAGS  := -I$(MPG123_PREFIX)/include
  MPG123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lmpg123
  OUT123_CFLAGS  := -I$(MPG123_PREFIX)/include
  OUT123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lout123
endif

# Define to any C99 compiler.
CC = cc -std=c99
CFLAGS = -O

# Oder of libs not that important here...
compile = $(CC) $(CPPFLAGS) $(CFLAGS) $(MPG123_CFLAGS)
linkflags = $(MPG123_LDFLAGS) $(LDFLAGS)

mpg123_to_out123: mpg123_to_out123.c
	$(compile) -o $@ $< $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags)

mpg123_to_wav_replaced_io: mpg123_to_wav_replaced_io.c
	$(compile) -o $@ $< $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags)

mpg123_to_wav_reader64: mpg123_to_wav_reader64.c
	$(compile) -o $@ $< $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags)

feedseek: feedseek.c
	$(compile) -o feedseek feedseek.c $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags)

scan: scan.c
	$(compile) -o scan scan.c $(linkflags)

id3dump:id3dump.c
	$(compile) -o id3dump id3dump.c $(linkflags)

dump_seekindex: dump_seekindex.c
	$(compile) -o dump_seekindex dump_seekindex.c $(linkflags)

mpglib: mpglib.c
	$(compile) -o mpglib mpglib.c $(linkflags)

extract_frames: extract_frames.c
	$(compile) -o $@ $< $(linkflags)

clean:
	rm -vf $(targets)