makefile.vc
1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#----------------------------------------------------------------------
# This is the Makefile to compile lib-ift with MS Visual C++ (cl.exe)
# using the GNU make or NMAKE.
#
# Instruction: Open the "Visual Studio Command Prompt" and type
# "C:\ift> make -f makefile.vc" or
# "C:\ift> nmake -f makefile.vc"
#
#----------------------------------------------------------------------
# Set these variables first
IFT_DIR="C:\ift"
PY_INC="C:\Python26\include"
PY_LIB="C:\Python26\libs\python26.lib"
PROG=libift
all: _$(PROG).pyd
_$(PROG).pyd: $(PROG).i $(PROG).c
@echo Generating wrappers...
@swig -python $(PROG).i
@echo Compiling...
@cl.exe /nologo -c $(PROG).c $(PROG)_wrap.c -I $(PY_INC) -I $(IFT_DIR)\include
@echo Linking...
@link.exe /nologo -dll $(PROG).obj $(PROG)_wrap.obj $(PY_LIB) $(IFT_DIR)\lib\libift.lib -out:_$(PROG).pyd
@echo Done.
clean:
del $(PROG).o $(PROG).py $(PROG)_wrap.c $(PROG)_wrap.o $(PROG).py _$(PROG).so *.pyc *.obj *.pyd *.exp *.lib *~