From fb55ec9b64cc6d58f231917ec26b16473f60e7db Mon Sep 17 00:00:00 2001 From: Georgi Chorbadzhiyski Date: Wed, 21 Sep 2011 00:56:26 +0300 Subject: [PATCH] examples: Allow examples to link on OS X. On OS X -liconv is needed in LDFLAGS otherwise examples do not link. Tested on OS X 10.6.8. --- examples/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/Makefile b/examples/Makefile index 84d2c6c..fd48761 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -5,6 +5,13 @@ CFLAGS_LOCAL = -Wall -O2 -g -I. -I../.. LDFLAGS = OBJ = dvb_print_si dvb_ecmg dvb_ecmg_test mpeg_print_pcr rtp_check_seqnum +ifeq "$(shell uname -s)" "Darwin" +LDFLAGS += -liconv +# Prevent generation of .dSYM debug directories +CFLAGS += -gstabs +CFLAGS_LOCAL += -gstabs +endif + all: $(OBJ) %: %.c @@ -14,4 +21,4 @@ local: CFLAGS = $(CFLAGS_LOCAL) local: all clean: - -rm $(OBJ) + rm -rf $(OBJ)