Commit cf5f7a8e authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski
Browse files

examples: Fix compilation under OS X

parent a922cec6
PREFIX ?= /usr/local PREFIX ?= /usr/local
WARN = -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare WARN = -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare
CPPFLAGS = -I. CPPFLAGS = -I. -I.. -I../..
CFLAGS := $(WARN) -O2 -g $(CFLAGS) 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 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" ifeq "$(shell uname -s)" "Darwin"
LDLIBS += -liconv LDFLAGS += -liconv
# Prevent generation of .dSYM debug directories
CFLAGS += -gstabs
endif endif
all: $(OBJ) all: $(OBJ)
...@@ -21,4 +22,4 @@ install: $(OBJ) ...@@ -21,4 +22,4 @@ install: $(OBJ)
install -m 755 $(OBJ) "$(DESTDIR)$(PREFIX)/bin" install -m 755 $(OBJ) "$(DESTDIR)$(PREFIX)/bin"
clean: clean:
$(RM) $(OBJ) $(RM) -rf $(OBJ) *.dSYM
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment