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

CONFIWX = -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -O2

INCLUDE = -IC:\wxWidgets-3.1.1\include -IC:\wxWidgets-3.1.1\lib\gcc_lib\mswu

LIBRERIAS = -s -mthreads  -lwxmsw31u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lshlwapi -lversion -loleacc -lUxTheme -mwindows   -lwinspool     -lole32     -loleaut32   -lcomctl32  -luuid   -lwsock32 
# -lodbc32  -lkernel32 -luser32  -lcomdlg32  -lgdi32  -ladvapi32 -lshell32      

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

PROGRAMAEXE = programa311s.exe

$(PROGRAMAEXE): main.o main.cpp  port.cpp port.h port.o define.h
		$(CC) -o $(PROGRAMAEXE) main.o port.o   $(LIBDDL)     $(LIBRERIAS)  

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

port.o: port.cpp port.h define.h
		$(CC) -c -o port.o  $(CONFIWX)    $(INCLUDE)   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)