tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

Compilation error on MacOS 10.9.2 with xCode #24

Closed eltorio closed 10 years ago

eltorio commented 10 years ago

Due to the lack of separated librt we cannot compile under MacOS X , in fact all the required rt call are built in in standard libraries. So it just need to remove the -lrt this is a sample diff

diff --git a/app/convbin/gcc/makefile b/app/convbin/gcc/makefile index 463f529..b3e92ec 100644 --- a/app/convbin/gcc/makefile +++ b/app/convbin/gcc/makefile @@ -5,7 +5,7 @@ SRC = ../../../src

OPTS = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DENACMP -DNFREQ=3 -DNEXOBS=3 CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) $(OPTS) -g -LDLIBS = -lm -lrt +LDLIBS = -lm

convbin : convbin.o rtkcmn.o rinex.o sbas.o preceph.o rcvraw.o convrnx.o convbin : rtcm.o rtcm2.o rtcm3.o rtcm3e.o pntpos.o ephemeris.o ionex.o diff --git a/app/pos2kml/gcc/makefile b/app/pos2kml/gcc/makefile index 08621a7..c511f2d 100644 --- a/app/pos2kml/gcc/makefile +++ b/app/pos2kml/gcc/makefile @@ -3,7 +3,7 @@ BINDIR = /usr/local/bin SRC = ../../../src CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) -DTRACE -LDLIBS = -lm -lrt +LDLIBS = -lm

pos2kml : pos2kml.o convkml.o solution.o geoid.o rtkcmn.o preceph.o

diff --git a/app/rnx2rtkp/gcc/makefile b/app/rnx2rtkp/gcc/makefile index d9b86b7..091eabf 100644 --- a/app/rnx2rtkp/gcc/makefile +++ b/app/rnx2rtkp/gcc/makefile @@ -7,7 +7,7 @@ OPTS = -DTRACE -DENAGLO -DENAQZS -DENAGAL -DNFREQ=3

for no lapack

CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) $(OPTS) -LDLIBS = -lm -lrt +LDLIBS = -lm

CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) -DLAPACK $(OPTS)

LDLIBS = -lm -lrt -llapack -lblas

diff --git a/app/rtkrcv/gcc/makefile b/app/rtkrcv/gcc/makefile index 4191fc9..b40a29f 100644 --- a/app/rtkrcv/gcc/makefile +++ b/app/rtkrcv/gcc/makefile @@ -8,7 +8,7 @@ SRC = ../../../src CTARGET= -DENAGLO -DENAGAL -DENAQZS -DNFREQ=3

CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) -DTRACE $(CTARGET) -LDLIBS = -lm -lrt -lpthread +LDLIBS = -lm -lpthread

all : rtkrcv rtkrcv : rtkrcv.o rtkcmn.o rtksvr.o rtkpos.o geoid.o solution.o lambda.o diff --git a/app/str2str/gcc/makefile b/app/str2str/gcc/makefile index f8bf255..c068122 100644 --- a/app/str2str/gcc/makefile +++ b/app/str2str/gcc/makefile @@ -9,7 +9,7 @@ CTARGET=

OPTION = -DENAGLO -DENAGAL -DENAQZS -DENACMP -DTRACE -DNFREQ=3 -DNEXOBS=3 CFLAGS = -Wall -O3 -ansi -pedantic -I$(SRC) $(OPTION) $(CTARGET) -LDLIBS = -lm -lrt -lpthread +LDLIBS = -lm -lpthread

all : str2str str2str : str2str.o stream.o rtkcmn.o solution.o sbas.o geoid.o

tomojitakasu commented 10 years ago

Makefile is not supported on all environments. See 4.2 in the manual.