Compiles on linux

feature/19
Daniel Warner 2011-03-27 21:47:26 +01:00
parent e271bb86c5
commit eb6b6b11ba
3 changed files with 34 additions and 9 deletions

View File

@ -1,3 +1,5 @@
syntax: glob
Release\*
Debug\*
*.o
sat

View File

@ -25,14 +25,14 @@ Julian::Julian() {
#else
struct timeval tv;
gettimeofday(&tv, NULL);
struct tm;
gmtime_r(&tv.tv_sec, &tm);
Initialize(tm.tm_year + 1900,
tm.tm_mon,
tm.tm_mday,
tm.tm_hour,
tm.tm_min,
(double) tm.tm_sec + (double) tv.tv_usec / 1000000.0)
struct tm gmt;
gmtime_r(&tv.tv_sec, &gmt);
Initialize(gmt.tm_year + 1900,
gmt.tm_mon,
gmt.tm_mday,
gmt.tm_hour,
gmt.tm_min,
(double) gmt.tm_sec + (double) tv.tv_usec / 1000000.0);
#endif
}

23
Makefile Normal file
View File

@ -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)