TARGET = sip.exe
OFILES = main.o transform.o gencode.o export.o heap.o parser.o lexer.o
HFILES = sip.h parser.h

CC = gcc
CXX = g++
LINK = g++
CPPFLAGS = -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
CFLAGS = -O2 -w
CXXFLAGS = -O2 -w
LFLAGS = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -Wl,-s
LIBS = 
.SUFFIXES: .cpp .cxx .cc .C .c


.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

$(TARGET): $(OFILES)
	$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)

$(OFILES): $(HFILES)

install: $(TARGET)
	@if not exist c:\python25 mkdir c:\python25
	copy /y $(TARGET) c:\python25\$(TARGET)

clean:
	-del $(TARGET)
	-del main.o
	-del transform.o
	-del gencode.o
	-del export.o
	-del heap.o
	-del parser.o
	-del lexer.o
