# compiler
CC = gcc
RM = rm -f

# directories
INCLUDE =-Ic:/dev-cpp/include
LIB = -Lc:/dev_cpp/lib -lstdc++

# compiler options
CFLAGS = -Wall -ansi -xc++ -DWIN32

# Target file name (without extension).
TARGET = prog

# project source files
SRC = $(TARGET).c serial.c avr.c

# Define all object files.
OBJ = $(SRC:.c=.o)

# compile files
%.o: %.c
	$(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@


# link files
$(TARGET): $(OBJ)
	$(CC) -o $(TARGET) $(OBJ) $(LIB)


# make project
all: $(TARGET)

# clean project
clean:
	$(RM) $(TARGET)
	$(RM) $(OBJ)


	
