1 | --require("functions.lua") |
---|
2 | |
---|
3 | --------------------------------------------------- |
---|
4 | function setdefines() |
---|
5 | if (windows) then |
---|
6 | |
---|
7 | -- disable VS2005 CRT security warnings |
---|
8 | if (options["target"] == "vs2005") then |
---|
9 | table.insert(package.defines, "_CRT_SECURE_NO_DEPRECATE") |
---|
10 | end |
---|
11 | |
---|
12 | table.insert(package.defines, "WIN32") |
---|
13 | table.insert(package.links, { "user32"}) |
---|
14 | --table.insert(package.files, "../..src/resources.rc") |
---|
15 | end |
---|
16 | end |
---|
17 | --------------------------------------------------- |
---|
18 | function setfiles(path) |
---|
19 | core_files = |
---|
20 | { |
---|
21 | matchfiles(path .. "include/*.h"), |
---|
22 | matchfiles (path .. "src/*.cpp") |
---|
23 | } |
---|
24 | package.files = { core_files } |
---|
25 | |
---|
26 | --package.excludes = { |
---|
27 | -- "dont_build_this.c" |
---|
28 | --} |
---|
29 | end |
---|
30 | --------------------------------------------------- |
---|
31 | function setODElibpath() |
---|
32 | if (windows) then |
---|
33 | table.insert(package.libpaths, "../../../ode/lib") |
---|
34 | end |
---|
35 | end |
---|
36 | --------------------------------------------------- |
---|
37 | function setDefaultPack() |
---|
38 | if (not options["sdk"] and not options["source"] and not options["cvs"]) then |
---|
39 | options["sdk"] = true |
---|
40 | end |
---|
41 | end |
---|
42 | --------------------------------------------------- |
---|
43 | function setOGRElibpath() |
---|
44 | if (windows) then |
---|
45 | if (options["sdk"]) then |
---|
46 | table.insert(package.libpaths, "$(OGRE_HOME)") |
---|
47 | elseif (options["source"]) then |
---|
48 | table.insert(package.libpaths, "../../../../../OgreMain/lib") |
---|
49 | elseif (options["cvs"]) then |
---|
50 | table.insert(package.libpaths, "../../../../../../OgreHead/OgreMain/lib") |
---|
51 | end |
---|
52 | end |
---|
53 | end |
---|
54 | --------------------------------------------------- |
---|
55 | function setbuildoptions() |
---|
56 | if (linux) then |
---|
57 | package.buildoptions = { "-Wall" } |
---|
58 | end |
---|
59 | |
---|
60 | package.config["Debug"].buildflags = |
---|
61 | { |
---|
62 | |
---|
63 | } |
---|
64 | package.config["Release"].buildflags = |
---|
65 | { |
---|
66 | "optimize-speed", |
---|
67 | "no-symbols", |
---|
68 | "no-frame-pointer" |
---|
69 | } |
---|
70 | package.config["Debug"].objdir = "../obj/Debug" |
---|
71 | package.config["Release"].objdir = "../obj/Release" |
---|
72 | end |
---|
73 | --------------------------------------------------- |
---|
74 | function getsubScriptFolder() |
---|
75 | if (options["target"] == "vs6") then |
---|
76 | return "/scripts/VC6" |
---|
77 | end |
---|
78 | if (options["target"] == "vs2002") then |
---|
79 | return "/scripts/VC7" |
---|
80 | end |
---|
81 | if (options["target"] == "vs2003") then |
---|
82 | return "/scripts/VC7.1" |
---|
83 | end |
---|
84 | if (options["target"] == "vs2005") then |
---|
85 | return "/scripts/VC8" |
---|
86 | end |
---|
87 | if (options["target"] == "vs2005") then |
---|
88 | return "/scripts/VC8" |
---|
89 | end |
---|
90 | return "" |
---|
91 | end |
---|
92 | |
---|
93 | |
---|
94 | |
---|