-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGNUmakefile
49 lines (33 loc) · 1004 Bytes
/
GNUmakefile
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
#----------------------------------------------------------------------------------------------
# Makefile
#----------------------------------------------------------------------------------------------
include config.mak
vpath %.c $(SRCDIR)
vpath %.h $(SRCDIR)
OBJ_MP4OPUSENC = $(SRC_MP4OPUSENC:%.c=%.o)
OBJ_MP4OPUSDEC = $(SRC_MP4OPUSDEC:%.c=%.o)
SRC_ALL = $(SRC_MP4OPUSENC) $(SRC_MP4OPUSDEC)
ifneq ($(STRIP),)
LDFLAGS += -Wl,-s
endif
.PHONY: all clean distclean dep
all: $(MP4OPUSENC) $(MP4OPUSDEC)
$(MP4OPUSENC): $(OBJ_MP4OPUSENC)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(MP4OPUSDEC): $(OBJ_MP4OPUSDEC)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
%.o: %.c .depend
$(CC) $(CFLAGS) -c $< -o $@
clean:
$(RM) *.exe *.o .depend
distclean: clean
$(RM) config.*
dep: .depend
ifneq ($(wildcard .depend),)
include .depend
endif
.depend: config.mak
@$(RM) .depend
@$(foreach SRC, $(SRC_ALL:%=$(SRCDIR)/%), $(CC) $(SRC) $(CFLAGS) -g0 -MT $(SRC:$(SRCDIR)/%.c=%.o) -MM >> .depend;)
config.mak:
configure