-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathMakefile.win32
More file actions
85 lines (69 loc) · 2.69 KB
/
Makefile.win32
File metadata and controls
85 lines (69 loc) · 2.69 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright (C) 2007 Manu Garg.
# Author: Manu Garg <manugarg@gmail.com>
#
# Makefile for pacparser. Please read README file included with this package
# for more information about pacparser.
#
# pacparser is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
# pacparser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# This file is not part of the source code repository. It's generated by the
# packaging script.
-include version.mk
LIB_VER=1
CFLAGS=-g -DXP_WIN -DVERSION=$(VERSION) -Ispidermonkey/js/src -Wall
CC=gcc
.PHONY: clean pymod install-pymod
all: pacparser.dll pacparser.lib pactester
pacparser.o: pacparser.c pac_builtins.h js.lib
$(CC) $(CFLAGS) -c pacparser.c -o pacparser.o
fdlibm.lib js.lib:
$(MAKE) -C spidermonkey -f Makefile.win32
copy spidermonkey\fdlibm.lib .
copy spidermonkey\js.lib .
pacparser.dll: pacparser.o fdlibm.lib js.lib
$(CC) -shared -o pacparser.dll \
-Wl,--output-def,pacparser.def \
-Wl,--out-implib,libpacparser.a \
-Wl,--export-all-symbols \
pacparser.o -ljs -L. -lws2_32
pacparser.lib: pacparser.dll pacparser.def
lib /machine:i386 /def:pacparser.def
pactester: pactester.c pacparser.h pacparser.dll
$(CC) pactester.c -o pactester -lpacparser -L. -I.
dist: pacparser.dll pactester
if exist dist rmdir /s /q dist
mkdir dist
copy pacparser.dll dist
copy pacparser.h dist
copy pactester.exe dist
if exist pacparser.lib copy pacparser.lib dist
copy ..\README.md dist\README.txt
copy ..\COPYING dist\COPYING.txt
copy ..\INSTALL dist\INSTALL.txt
mkdir dist\docs
copy ..\README.win32 dist\docs
if exist ..\docs\html xcopy ..\docs\html dist\docs
# Targets to build python module
pymod: pacparser.h pacparser.dll
cd pymod && py setup.py dist
cd .. && py tests\runtests.py
pymod2: pacparser.h pacparser.dll
cd pymod && py -2 setup.py dist
cd .. && py -2 tests\runtests.py
pymod3: pacparser.h pacparser.dll
cd pymod && py -3 setup.py dist
cd .. && py -3 tests\runtests.py
clean:
del /F pacparser.dll *.lib pacparser.def pacparser.exp pacparser.o pactester.exe libpacparser.a
$(MAKE) -C spidermonkey -f Makefile.win32 clean
cd pymod && setup.py clean
if exist dist rmdir /s /q dist