# Makefile for snLib
# 20 Sep 2012
#

# Which C compiler to use - (cc, gcc xlc, etc.).
CC = gcc

# Compiler Flags
CFLAGS = -Wall -c -I. -Ilibmodbus-3.0.3/src

.c.o :
	$(CC) $(CFLAGS) $< 

TARGET	= snLib.a

SOURCE	= snLib.c

OBJECTS     = $(SOURCE:%.c=%.o)


# Linking object files
$(TARGET): $(OBJECTS)
	ar rv $(TARGET) $(OBJECTS)

# Compiling source files
# %.o :: %.c remSerial.h
#	$(CC) $(CFLAGS) -o $*.o $< 

# Remove executable and object files
clean:
	rm -f $(OBJECTS) 
