D-Modem/Makefile

34 lines
1.3 KiB
Makefile
Raw Normal View History

2022-12-01 21:25:43 +08:00
PJSIP_DIR=pjproject
2021-10-30 02:41:03 +08:00
PKG_CONFIG_PATH=pjsip.install/lib/pkgconfig
2022-11-11 18:18:47 +08:00
ifndef NO_PULSE
2022-12-01 21:25:43 +08:00
DM_LDFLAGS += -l pulse -l pulse-simple
DM_CFLAGS += -DHAS_PULSE
2022-11-11 18:18:47 +08:00
endif
2022-12-01 21:25:43 +08:00
all: d-modem slmodemd $(if $(NO_PULSE),,d-modem.nopulse)
2021-10-30 02:41:03 +08:00
$(PKG_CONFIG_PATH)/libpjproject.pc:
2022-11-13 02:34:35 +08:00
(cd $(PJSIP_DIR); [ -f ./config.status ] || ./configure --prefix=`pwd`/../pjsip.install --disable-video --disable-sound --enable-ext-sound --disable-speex-aec --enable-g711-codec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-sdl --disable-ffmpeg --disable-v4l2 --disable-openh264 --disable-vpx --disable-android-mediacodec --disable-darwin-ssl --disable-ssl --disable-opencore-amr --disable-silk --disable-opus --disable-bcg729 --disable-libyuv --disable-libwebrtc)
2021-10-30 02:41:03 +08:00
$(MAKE) -C $(PJSIP_DIR) && \
$(MAKE) -C $(PJSIP_DIR) install
2022-12-01 21:25:43 +08:00
d-modem d-modem.nopulse : d-modem.c $(PKG_CONFIG_PATH)/libpjproject.pc
$(CC) $(if $(findstring nopulse,$@),,$(DM_CFLAGS) $(DM_LDFLAGS)) -o $@ $< \
`PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --static --cflags --libs libpjproject` \
-O2 -s
2022-11-11 12:52:44 +08:00
2021-10-30 02:41:03 +08:00
slmodemd:
$(MAKE) -C slmodemd
clean:
2022-11-11 18:18:47 +08:00
rm -f d-modem.o d-modem d-modem.nopulse
2021-10-30 02:41:03 +08:00
$(MAKE) -C slmodemd clean
realclean: clean
$(MAKE) -C $(PJSIP_DIR) realclean
rm -rf pjsip.install/*
2022-11-13 02:34:35 +08:00
2021-10-30 02:41:03 +08:00
.PHONY: all clean realclean slmodemd