-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.am
51 lines (39 loc) · 1.46 KB
/
Makefile.am
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
AM_CXXFLAGS = -I$(top_srcdir)/src
EXTRA_DIST = CMakeLists.txt sdl/linux.cc sdl/winnt.cc sdl/osx.h sdl/osx.m
## Our header files
pkgincludemaindir = $(pkgincludedir)/main/
pkgincludemain_HEADERS = \
adonthell.h
## Main library
lib_LTLIBRARIES = libadonthell_main.la
## Rules to build libmain
libadonthell_main_la_SOURCES = \
adonthell.cc \
main.cc
libadonthell_main_la_CXXFLAGS = $(PY_CFLAGS) $(AM_CXXFLAGS)
libadonthell_main_la_LIBADD = $(PY_LIBS) -lltdl \
-L$(top_builddir)/src/base -ladonthell_base \
-L$(top_builddir)/src/gfx -ladonthell_gfx \
-L$(top_builddir)/src/audio -ladonthell_audio \
-L$(top_builddir)/src/input -ladonthell_input \
-L$(top_builddir)/src/python -ladonthell_python \
-L$(top_builddir)/src/world -ladonthell_world
###### Following definitions are for the backends
pkglibmaindir = $(pkglibdir)/main
pkglibmain_LTLIBRARIES = _sdl.la
### SDL backend
## MacOS X specific files
if OSX_COMPILE
_sdl_hdrs = sdl/osx.h
_sdl_la_SOURCES = sdl/osx.m $(_sdl_hdrs)
_sdl_la_OBJCFLAGS = $(AM_CXXFLAGS) $(SDL_CFLAGS) -ObjC++
_sdl_la_LDFLAGS = -module -avoid-version -Wl,-framework,Cocoa -lobjc
## Files specific to Linux (and others)
else
_sdl_la_SOURCES = sdl/linux.cc
_sdl_la_LDFLAGS = -module -avoid-version
endif
_sdl_la_CXXFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" $(SDL_CFLAGS) $(AM_CXXFLAGS)
_sdl_la_LIBADD = $(SDL_LIBS) -ladonthell_main -lstdc++
## define dependencies in case of parallel build
_sdl_la_DEPENDENCIES = libadonthell_main.la