.SUFFIXES: .o .C .c  .cpp


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

include mkflags.win
include mk.inf

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

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

.c.o:
	sjisfix $(*F).c  _$(*F).c
	$(CC1) $(ALL_INCLUDES) $(C++FLAGS) -c _$(*F).c  -o $*.o
	rm.exe -f _$(*F).c
.C.o:
	sjisfix $(*F).C  _$(*F).C
	$(CC) $(ALL_INCLUDES) $(C++FLAGS) -c _$(*F).C   -o $*.o
	rm.exe -f _$(*F).C

.cpp.o:
	sjisfix $(*F).cpp  _$(*F).cpp
	$(CC) $(ALL_INCLUDES) $(C++FLAGS) -c _$(*F).cpp -o $*.o
	rm.exe -f _$(*F).cpp

all: $(TARGET).exe

$(TARGET).exe: $(OBJS) wsres.o
	$(CC) $(C++FLAGS) -o $(TARGET) $(OBJS) $(ALL_LIBS) wsres.o
	cp wstracer.exe ../../bin

wsres.o:wsres.rc
	windres --include-dir ./icons -I rc -i wsres.rc -o wsres.o

clean:
	rm.exe -f $(TARGET).exe *.o *~ log.txt ../../bin/$(TARGET).exe


