-
Notifications
You must be signed in to change notification settings - Fork 12
/
Jamfile
69 lines (61 loc) · 1.96 KB
/
Jamfile
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
#---- setup ----
if $(OS) = NT {
C++FLAGS = /nologo /c /EHsc /W3 /WX /MD /I"kit-libs-win/out/include" /I"kit-libs-win/out/include/SDL2" /I"kit-libs-win/out/libpng"
#disable a few warnings:
/wd4146 #-1U is still unsigned
/wd4297 #unforunately SDLmain is nothrow
;
LINKFLAGS = /nologo /SUBSYSTEM:CONSOLE
/LIBPATH:"kit-libs-win/out/lib"
/LIBPATH:"kit-libs-win/out/libpng"
/LIBPATH:"kit-libs-win/out/zlib"
;
LINKLIBS = SDL2main.lib SDL2.lib OpenGL32.lib libpng.lib zlib.lib ;
File dist\\SDL2.dll : kit-libs-win\\out\\dist\\SDL2.dll ;
} else if $(OS) = MACOSX {
KIT_LIBS = kit-libs-osx ;
C++ = clang++ ;
C++FLAGS =
-std=c++14 -g -Wall -Werror
-I$(KIT_LIBS)/libpng/include #libpng
-I$(KIT_LIBS)/glm/include #glm
`PATH=$(KIT_LIBS)/SDL2/bin:$PATH sdl2-config --cflags` #SDL2
;
LINK = clang++ ;
LINKFLAGS = -std=c++14 -g -Wall -Werror ;
LINKLIBS =
-L$(KIT_LIBS)/libpng/lib -lpng #libpng
-L$(KIT_LIBS)/zlib/lib -lz #zlib
`PATH=$(KIT_LIBS)/SDL2/bin:$PATH sdl2-config --static-libs` -framework OpenGL #SDL2
;
} else if $(OS) = LINUX {
KIT_LIBS = kit-libs-linux ;
C++ = g++ ;
C++FLAGS =
-std=c++11 -g -Wall -Werror
-I$(KIT_LIBS)/libpng/include #libpng
-I$(KIT_LIBS)/glm/include #glm
`PATH=$(KIT_LIBS)/SDL2/bin:$PATH sdl2-config --cflags` #SDL2
;
LINK = g++ ;
LINKFLAGS = -std=c++11 -g -Wall -Werror ;
LINKLIBS =
-L$(KIT_LIBS)/libpng/lib -lpng #libpng
-L$(KIT_LIBS)/zlib/lib -lz #zlib
`PATH=$(KIT_LIBS)/SDL2/bin:$PATH sdl2-config --static-libs` -lGL #SDL2
;
}
#---- build ----
NAMES =
main
load_save_png
Scene
Meshes
;
if $(OS) = NT {
NAMES += gl_shims ;
}
LOCATE_TARGET = objs ; #put objects in 'objs' directory
Objects $(NAMES:S=.cpp) ;
LOCATE_TARGET = dist ; #put main in 'dist' directory
MainFromObjects main : $(NAMES:S=$(SUFOBJ)) ;