forked from daokoder/DaoGraphics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.dao
89 lines (71 loc) · 2.31 KB
/
makefile.dao
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
86
87
88
89
project_headers =
{
"source/dao_common.h" ,
"source/dao_font.h" ,
"source/dao_path.h" ,
"source/dao_canvas.h" ,
"source/dao_mesh.h" ,
"source/dao_scene.h" ,
"source/dao_terrain.h" ,
"source/dao_triangulator.h" ,
"source/dao_painter.h" ,
"source/dao_renderer.h" ,
"source/dao_animation.h" ,
"source/dao_particle.h" ,
"source/dao_resource.h" ,
"source/dao_xml.h" ,
"source/dao_format.h" ,
"source/dao_opengl.h" ,
"source/stb_truetype.h" ,
}
project_sources =
{
"source/dao_common.c" ,
"source/dao_font.c" ,
"source/dao_path.c" ,
"source/dao_canvas.c" ,
"source/dao_mesh.c" ,
"source/dao_scene.c" ,
"source/dao_terrain.c" ,
"source/dao_triangulator.c" ,
"source/dao_painter.c" ,
"source/dao_renderer.c" ,
"source/dao_animation.c" ,
"source/dao_particle.c" ,
"source/dao_graphics.c" ,
"source/dao_resource.c" ,
"source/dao_xml.c" ,
"source/dao_format.c" ,
"source/dao_opengl.c" ,
"source/dao_window.c" ,
}
glname = DaoMake::IsPlatform( "MACOSX" ) ? "OpenGL3" : "OpenGL";
daovm = DaoMake::FindPackage( "Dao", $REQUIRED )
opengl = DaoMake::FindPackage( glname, $OPTIONAL )
gles = DaoMake::FindPackage( "OpenGLES", $OPTIONAL )
if( daovm == none ) return
if( opengl == none and gles == none ) return
project = DaoMake::Project( "DaoGraphics" )
project.AddDirectory( "glfw", "deps/glfw" )
glfw = DaoMake::FindPackage( "GLFW", $REQUIRED )
# In Linux, one may place GL/gl3.h under the current directory:
DaoMake::Includes.append( project.SourcePath() )
project_objs = project.AddObjects( project_sources, project_headers )
project_dll = project.AddSharedLibrary( "dao_graphics", project_objs )
project_lib = project.AddStaticLibrary( "dao_graphics", project_objs )
project.UseImportLibrary( daovm )
project.UseStaticLibrary( glfw )
if( gles != none ){
project.AddDefinition( "DAO_GRAPHICS_USE_GLES" )
project.UseSharedLibrary( gles )
}else{
project.UseSharedLibrary( opengl )
}
project.AddIncludePath( "../random" )
project.AddIncludePath( "../image/source" )
project.AddIncludePath( "deps/glfw/include" )
project.SetTargetPath( "../../lib/dao/modules" )
project.Install( DaoMake::Variables[ "INSTALL_MOD" ], project_dll );
project.Install( DaoMake::Variables[ "INSTALL_MOD" ], project_lib );
findpkg = project.GenerateFinder( $TRUE );
project.Install( DaoMake::Variables[ "INSTALL_FINDER" ], findpkg );