# Makefile for Mercurial wrapper executable

# XXX The compiler you are using
CC=	 	gcc

# XXX Top of the build tree and source tree
PY_DIR=		F:/py/244

# Python version
VERSION=	24

# Compiler flags
OPT=		-Zmt -O3 -mprobe -Wall
INCLUDES=	-I$(PY_DIR)/Include
CFLAGS=		$(OPT)
CPPFLAGS=	$(INCLUDES)

# The Python library
LIBPYTHON=	-lpython$(VERSION)

# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
LIBS=		-lgcc
LDFLAGS=	-Zmt -Zcrtdll -L$(PY_DIR)/Config
SYSLIBS=	
MODLIBS=	
ALLLIBS=	$(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)

# Build the demo applications
all:		hg.exe
hg.exe:		hg.o
		$(CC) $(LDFLAGS) hg.o $(ALLLIBS) -o hg.exe

hg.o:		hg.c
		$(CC) $(CFLAGS) $(INCLUDES) -c -o hg.o hg.c


# Administrative targets

clean:
		-rm -f *.o *.exe core
