gps-sdr-sim/Makefile

44 lines
1019 B
Makefile
Raw Normal View History

2015-06-30 12:10:15 +08:00
# Makefile for Linux etc.
2015-07-09 07:18:57 +08:00
.PHONY: all clean time
2015-07-02 19:09:47 +08:00
all: gps-sdr-sim
2015-06-30 12:10:15 +08:00
SHELL=/bin/bash
CC=gcc
CFLAGS=-O3 -Wall -D_FILE_OFFSET_BITS=64
ifdef USER_MOTION_SIZE
CFLAGS+=-DUSER_MOTION_SIZE=$(USER_MOTION_SIZE)
endif
2016-01-22 16:28:38 +08:00
LDFLAGS=-lm
2015-06-30 12:10:15 +08:00
gps-sdr-sim: gpssim.o
${CC} $< ${LDFLAGS} -o $@
2020-01-06 22:29:50 +08:00
gpssim.o: .user-motion-size gpssim.h
.user-motion-size: .FORCE
@if [ -f .user-motion-size ]; then \
if [ "`cat .user-motion-size`" != "$(USER_MOTION_SIZE)" ]; then \
echo "Updating .user-motion-size"; \
echo "$(USER_MOTION_SIZE)" >| .user-motion-size; \
fi; \
else \
echo "$(USER_MOTION_SIZE)" > .user-motion-size; \
fi;
2015-06-30 12:10:15 +08:00
clean:
rm -f gpssim.o gps-sdr-sim *.bin .user-motion-size
2015-07-01 17:03:02 +08:00
2015-07-09 07:18:57 +08:00
time: gps-sdr-sim
2016-01-22 16:29:30 +08:00
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 1
2015-07-01 17:03:02 +08:00
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 8
time ./gps-sdr-sim -e brdc3540.14n -u circle.csv -b 16
.FORCE:
YEAR?=$(shell date +"%Y")
Y=$(patsubst 20%,%,$(YEAR))
%.$(Y)n:
wget -q ftp://cddis.gsfc.nasa.gov/gnss/data/daily/$(YEAR)/brdc/$@.Z -O $@.Z
uncompress $@.Z