-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile.lib
More file actions
46 lines (35 loc) · 999 Bytes
/
Makefile.lib
File metadata and controls
46 lines (35 loc) · 999 Bytes
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
# GNU Makefile for libraries
#
# Please compile with GNU make.
#
# 2005 bl0rg.net
all: libs libfec-test
libs: libfec.so
CFLAGS += -Wall -O2 -fPIC -g
# Create dependencies
%.d: %.c
$(CC) -MM $(CFLAGS) $< > $@
$(CC) -MM $(CFLAGS) $< | sed s/\\.o/.d/ >> $@
MP3_OBJS := mp3-read.o mp3-write.o mp3.o aq.o id3.o
UTILS_OBJS := pack.o bv.o signal.o dlist.o file.o buf.o crc32.o
FEC_OBJS := galois.o matrix.o fec.o fec-pkt.o fec-rb.o fec-group.o
OBJS := $(MP3_OBJS) \
$(OGG_OBJS) \
$(NETWORK_OBJS) \
$(RTP_OBJS) \
$(UTILS_OBJS) \
$(FEC_OBJS)
DEPS := $(patsubst %.o,%.d,$(OBJS))
include $(DEPS)
# FEC library
LIBFEC_OBJS := $(UTILS_OBJS) $(MP3_OBJS) $(FEC_OBJS) libfec.o
include libfec.d
libfec.a: $(LIBFEC_OBJS)
ar r $@ $(LIBFEC_OBJS)
ranlib $@
libfec.so: $(LIBFEC_OBJS)
# $(LD) -o $@ -shared $(LIBFEC_OBJS)
$(CC) -dynamiclib -o $@ $(LIBFEC_OBJS)
include libfec-test.d
libfec-test: libfec.a libfec-test.o
$(CC) -o $@ libfec-test.o -L. -lfec