# Makefile for decode for BEDS project
# 3 Nov 2011, Bob Herlien
#

# Which C compiler to use - (cc, gcc xlc, etc.).
CC = gcc

# Compiler Flags
CFLAGS = -Wall -c -I. -I.. -I../beds

.c.o :
	$(CC) $(CFLAGS) $< 

SOURCE	= decodeMain.c ../beds/decode.c

OBJECTS     = decodeMain.o decode.o

ifdef IS_UNIX
  TARGET	= bedsDecode
else
  TARGET	= bedsDecode.exe
endif

$(TARGET): $(OBJECTS)
	$(CC) -lm -o $(TARGET) $(OBJECTS)

decodeMain.o: decodeMain.c

decode.o: ../beds/decode.c
	$(CC) $(CFLAGS) $< 

clean:
	rm $(TARGET) *.o

