TPRO_ROOT = ../../..
GENERATE_DEPENDENCIES = -M -MF $(1)

include $(TPRO_ROOT)/buildUtils/dependencyGeneration.mk

CFLAGS= -Wall -Werror -I../../h -I$(TPRO_ROOT)/common/h \
								-I$(TPRO_ROOT)/common/lib \
								-I$(TPRO_ROOT)/common/tsync/h \
								-I../../tsync/h

SOURCES = open.c close.c altitude.c getdate.c getdriver.c		\
	getfirmware.c getfpga.c getlatitude.c getlongitude.c		\
	getsatinfo.c gettime.c resetfirmware.c setheartbeat.c		\
	setmatchtime.c setoscillator.c setpropdelaycorr.c settime.c setyear.c		\
	simevent.c synchcontrol.c synchstatus.c waitevent.c		\
	waitheartbeat.c waitmatch.c peek.c poke.c tpro_capabilities.c	\
	tpro_date_time.c

vpath %.c ../
vpath %.c $(TPRO_ROOT)/common/lib
vpath %.h ../../h
vpath %.h $(TPRO_ROOT)/common/h
vpath %.h $(TPRO_ROOT)/common/tsync/h

OBJS = $(patsubst %.c,%.o,$(SOURCES))
DEPENDENCIES = $(patsubst %.c,%.d,$(SOURCES))

ifndef SKIP_DEPENDENCY_GENERATION
-include $(DEPENDENCIES)
endif

libtpro.a: $(OBJS)
	-ar rv libtpro.a $(OBJS)

clean:
	-rm -f *.[oad] *~

