From cf5f7a8e63e36762d5f0ffd5c46f776a7c1fb716 Mon Sep 17 00:00:00 2001 From: Georgi Chorbadzhiyski Date: Sun, 18 Feb 2018 20:49:29 +0200 Subject: [PATCH] examples: Fix compilation under OS X --- examples/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 984c8b6..b5541d3 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,14 +1,15 @@ PREFIX ?= /usr/local WARN = -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -CPPFLAGS = -I. +CPPFLAGS = -I. -I.. -I../.. CFLAGS := $(WARN) -O2 -g $(CFLAGS) -LDFLAGS := -lrt $(LDFLAGS) OBJ = dvb_print_si dvb_gen_si dvb_ecmg dvb_ecmg_test mpeg_print_pcr rtp_check_seqnum mpeg_restamp +ifeq "$(shell uname -s)" "Linux" +LDFLAGS += -lrt +endif + ifeq "$(shell uname -s)" "Darwin" -LDLIBS += -liconv -# Prevent generation of .dSYM debug directories -CFLAGS += -gstabs +LDFLAGS += -liconv endif all: $(OBJ) @@ -21,4 +22,4 @@ install: $(OBJ) install -m 755 $(OBJ) "$(DESTDIR)$(PREFIX)/bin" clean: - $(RM) $(OBJ) + $(RM) -rf $(OBJ) *.dSYM