CFLAGS     = 
CC         = g++
CPP        = cpp
LFLAGS     = -s
LD         = gcc
AFLAGS     = -f elf
AR         = ar
RANLIB     = ranlib
STRIP      = strip
RM         = rm -f
WXCONFI    = wx-config
INCLUDES   = -I. `sdl-config --cflags` `wx-config --cflags`
LIBS       = -lws2_32 -lole32 -loleacc -lolepro32 -lgdi32 -luser32 \
	-ladvapi32 -lcomctl32 -lcomdlg32 -luuid -lrpcrt4 \
	-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -lwsock32 \
	-lwx_msw_treelistctrl-2.8 -lwx_msw_fiximp-2.8 -lwx_msw_stc-2.8 \
	-lwx_msw_gizmos-2.8 -lwx_msw_gizmos_xrc-2.8 -lwx_msw_ogl-2.8 \
	-lwx_msw_plot-2.8 -lwx_msw_svg-2.8 -lwx_msw_fl-2.8 \
	-lwx_msw_richtext-2.8 -lwx_msw_aui-2.8 -lwx_msw_xrc-2.8 \
	-lwx_msw_qa-2.8 -lwx_msw_html-2.8 -lwx_msw_adv-2.8 \
	-lwx_msw_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 \
	-lwx_base-2.8 -lwxpng-2.8 -lwxjpeg-2.8 \
	-lwxtiff-2.8 -lwxexpat-2.8 -lwxzlib-2.8 -lwxregex-2.8 \
	`sdl-config --libs` `wx-config --libs`
CSOURCES   = monitor.cpp sdlpanel.cpp sdlframe.cpp
OBJECTS   = $(CSOURCES:.cpp=.o)
EXECUTABLE = monitor.exe

$(EXECUTABLE): $(OBJECTS)
	$(CC) -o $@ -mthreads -Wl,--subsystem,windows -mwindows $(OBJECTS) $(LIBS)
	$(STRIP) $(EXECUTABLE)

%.o: %.cpp
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

clean:
	$(RM) $(EXECUTABLE) $(OBJECTS)
