# Garble-C++ Makefile
# $Id: Makefile,v 1.2 2000/05/23 18:07:35 decouto Exp $

GARMIN_SRCS = \
	garmin_application.cp \
	garmin_link.cp	      \
	garmin_util.cp	      


GARMIN_OBJS := $(GARMIN_SRCS:.cp=.o)

UNIX_SERIAL_SRCS = \
	garmin_serial_unix.cp 

UNIX_SERIAL_OBJS := $(UNIX_SERIAL_SRCS:.cp=.o)

TEST_SRCS = \
	test.cp

TEST_OBJS := $(TEST_SRCS:.cp=.o)

OTHER_SRCS = \
	mytimer.cpp \
	serial.cp   

CC = g++
CFLAGS = -g -Wall
CPPFLAGS = -DDEBUG -DDBUG -UDO_BYTE_SWAP

.SUFFIXES: .cp

.cp.o:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

default: garble

garble: garble.o $(GARMIN_OBJS) $(UNIX_SERIAL_OBJS)
	g++ -o garble garble.o $(GARMIN_OBJS) $(UNIX_SERIAL_OBJS)


test: $(TEST_OBJS) $(GARMIN_OBJS) $(UNIX_SERIAL_OBJS)
	g++ -o test $(TEST_OBJS) $(GARMIN_OBJS) $(UNIX_SERIAL_OBJS)

dep:
	makedepend -y $(TEST_SRCS) $(GARMIN_SRCS) $(UNIX_SERIAL_SRCS)

clean:
	rm -f test *.o *~

list_srcs:
	echo "garmin:" $(GARMIN_SRCS)
	echo "unix serial:" $(UNIX_SERIAL_SRCS)
	echo "test:" $(TEST_SRCS)


list_objs:
	echo "garmin:" $(GARMIN_OBJS)
	echo "unix serial:" $(UNIX_SERIAL_OBJS)
	echo "test:" $(TEST_OBJS)

