.SUFFIXES: .o .C .c  .cpp


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

include mkflags
include mk.inf

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

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

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

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

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


all: $(TARGET)

$(TARGET): $(OBJS)
	dllwrap -o $(TARGET) $(OBJS) -mwindows --export-all-symbols $(ALL_LIBS) --output-def $(TARGET).def --driver-name g++
	dlltool --def $(TARGET).def --dllname $(TARGET) --output-lib $(TARGET2)

clean:
	rm.exe -f $(TARGET) $(TARGET2) *.o log.txt


