mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-06 05:13:49 +00:00
since they are targets that do not have resulting files and are never listed as prerequisites to real targets. Using .PHONY in this manner improves make performance by never having to check for resulting files. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
56 lines
1.1 KiB
Makefile
56 lines
1.1 KiB
Makefile
#
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
#
|
|
# Makefile for file format modules
|
|
#
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
|
#
|
|
# Mark Spencer <markster@digium.com>
|
|
#
|
|
# This program is free software, distributed under the terms of
|
|
# the GNU General Public License
|
|
#
|
|
|
|
.PHONY: clean clean-depend
|
|
|
|
ifneq ($(wildcard ../menuselect.makeopts),)
|
|
include ../menuselect.makeopts
|
|
endif
|
|
|
|
SELECTED_MODS:=$(filter-out $(MENUSELECT_FORMATS),$(patsubst %.c,%,$(wildcard format_*.c)))
|
|
|
|
GSMLIB=../codecs/gsm/lib/libgsm.a
|
|
|
|
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
|
|
|
all: $(MODS)
|
|
|
|
clean-depend:
|
|
rm -f .depend
|
|
|
|
clean: clean-depend
|
|
rm -f *.so *.o
|
|
|
|
%.so : %.o
|
|
$(CC) $(SOLINK) -o $@ $<
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
include .depend
|
|
endif
|
|
|
|
format_ogg_vorbis.so : format_ogg_vorbis.o
|
|
$(CC) $(SOLINK) -o $@ $< $(OGG_LIB) $(VORBIS_LIB)
|
|
|
|
format_ogg_vorbis.o: format_ogg_vorbis.c
|
|
$(CC) -c -o $@ $(CFLAGS) $(OGG_INCLUDE) $(VORBIS_INCLUDE) $<
|
|
|
|
install: all
|
|
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
|
|
|
uninstall:
|
|
|
|
depend: .depend
|
|
|
|
.depend:
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|