#CC = g++
CC =mingw32-g++.exe

# Quitar -w para que no aparezcan Warning al compilar

CONFIWX = -w -pipe -mthreads -Wno-unused-local-typedefs -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -O2

INCLUDE = -IC:\wxWidgets-2.8.12\include
INCLUDE2 = -IC:\wxWidgets-2.8.12\lib\gcc_lib\mswu

LIBRERIAS = -s -mthreads  -lwxmsw28u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows

LIBDDL = -LC:\wxWidgets-2.8.12\lib\gcc_lib


PROGRAMAEXE = programa2812s.exe

$(PROGRAMAEXE): main.o main.cpp  port.cpp port.h port.o define.h
		$(CC) -o  $(PROGRAMAEXE) main.o port.o   $(LIBDDL)   -Wl,--subsystem,windows -mwindows  $(LIBRERIAS)  

main.o: main.cpp port.h define.h 
		$(CC) -c -o main.o  $(CONFIWX)    $(INCLUDE) $(INCLUDE2)  main.cpp

port.o: port.cpp port.h define.h
		$(CC) -c -o port.o  $(CONFIWX)    $(INCLUDE) $(INCLUDE2) port.cpp

		
#all		:rs232.o port.o
#		$(CC) -c -o  rs232 rs232.o  port.o  $(CONFIWX)

clean:
	del	main.o
	del port.o
	del $(PROGRAMAEXE)