Compiles on linux
parent
e271bb86c5
commit
eb6b6b11ba
|
@ -1,3 +1,5 @@
|
||||||
syntax: glob
|
syntax: glob
|
||||||
Release\*
|
Release\*
|
||||||
Debug\*
|
Debug\*
|
||||||
|
*.o
|
||||||
|
sat
|
||||||
|
|
16
Julian.cpp
16
Julian.cpp
|
@ -25,14 +25,14 @@ Julian::Julian() {
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
struct tm;
|
struct tm gmt;
|
||||||
gmtime_r(&tv.tv_sec, &tm);
|
gmtime_r(&tv.tv_sec, &gmt);
|
||||||
Initialize(tm.tm_year + 1900,
|
Initialize(gmt.tm_year + 1900,
|
||||||
tm.tm_mon,
|
gmt.tm_mon,
|
||||||
tm.tm_mday,
|
gmt.tm_mday,
|
||||||
tm.tm_hour,
|
gmt.tm_hour,
|
||||||
tm.tm_min,
|
gmt.tm_min,
|
||||||
(double) tm.tm_sec + (double) tv.tv_usec / 1000000.0)
|
(double) gmt.tm_sec + (double) tv.tv_usec / 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
CC=g++
|
||||||
|
CFLAGS=-c -Wall -g
|
||||||
|
LDFLAGS=
|
||||||
|
SOURCES=Coord.cpp \
|
||||||
|
Globals.cpp \
|
||||||
|
Julian.cpp \
|
||||||
|
main.cpp \
|
||||||
|
SGDP4.cpp \
|
||||||
|
Tle.cpp \
|
||||||
|
Vector.cpp
|
||||||
|
OBJECTS=$(SOURCES:.cpp=.o)
|
||||||
|
EXECUTABLE=sat
|
||||||
|
|
||||||
|
all: $(SOURCES) $(EXECUTABLE)
|
||||||
|
|
||||||
|
$(EXECUTABLE): $(OBJECTS)
|
||||||
|
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.o $(EXECUTABLE)
|
Loading…
Reference in New Issue