

CC=gcc
OPT= -fexpensive-optimizations -O2 -finline-functions -ffast-math -pipe -fomit-frame-pointer -s 
CFLAGS=$(OPT) -Wall -D__WIN32__=1
LIBS= -L"lib" -lm
#-mwindows

EXAMPLES=led.exe

all : $(EXAMPLES)

%.exe : %.o
	$(CC) $(LIBS) $^ -o $@ 

%.o : %.c
	$(CC) $(CFLAGS) -c $^ -o $@

led.exe: serial.o
	$(CC) $(LIBS) $^ -o $@

clean :
	rm -f led.exe *.o *.bak



### PHONY define
.PHONY: all all-before all-after clean clean-custom



