.SUFFIXES: .o .C .c  .cpp


############################################################

include mkflags
include mk.inf

############################################################

C++FLAGS = $(DEBUG_DLL) $(ARCH)

.c.o:
	$(CC1) $(ALL_INCLUDES) $(C++FLAGS) -c $(*F).c  -o $*.o

.C.o:
	$(CC) $(ALL_INCLUDES) $(C++FLAGS) -c $(*F).C   -o $*.o

.cpp.o:
	$(CC) $(ALL_INCLUDES) $(C++FLAGS) -c $(*F).cpp -o $*.o


all: $(TARGET)

$(TARGET): $(OBJS) wsres.o
	$(DLLWRAP) -o $(TARGET) $(OBJS) wsres.o -mwindows --export-all-symbols $(ALL_LIBS) --output-def $(TARGET).def --driver-name g++ --add-stdcall-alias
	$(DLLTOOL) --def $(TARGET).def --dllname $(TARGET) --output-lib $(TARGET).a

wsres.o:wsres.rc
	$(WINDRES) --include-dir ./icons -I rc -i wsres.rc -o wsres.o

clean:
	$(RM) -f $(TARGET) $(TARGET).a *.o log.txt


