NEWS: prepare for 6.6.1
[xcsoar.git] / build / screen.mk
blobf8e82fb5c7d5f4e85b81169ebf59d423ba82f0fb
1 # Build rules for the portable screen library
3 SCREEN_SRC_DIR = $(SRC)/Screen
5 SCREEN_SOURCES = \
6 $(SCREEN_SRC_DIR)/Debug.cpp \
7 $(SCREEN_SRC_DIR)/ProgressBar.cpp \
8 $(SCREEN_SRC_DIR)/Util.cpp \
9 $(SCREEN_SRC_DIR)/Icon.cpp \
10 $(SCREEN_SRC_DIR)/Brush.cpp \
11 $(SCREEN_SRC_DIR)/Canvas.cpp \
12 $(SCREEN_SRC_DIR)/Color.cpp \
13 $(SCREEN_SRC_DIR)/BufferCanvas.cpp \
14 $(SCREEN_SRC_DIR)/Pen.cpp \
15 $(SCREEN_SRC_DIR)/Window.cpp \
16 $(SCREEN_SRC_DIR)/BufferWindow.cpp \
17 $(SCREEN_SRC_DIR)/DoubleBufferWindow.cpp \
18 $(SCREEN_SRC_DIR)/SingleWindow.cpp
20 SCREEN_CUSTOM_SOURCES = \
21 $(SCREEN_SRC_DIR)/Custom/Timer.cpp \
22 $(SCREEN_SRC_DIR)/Custom/TextWindow.cpp \
23 $(SCREEN_SRC_DIR)/Custom/LargeTextWindow.cpp \
24 $(SCREEN_SRC_DIR)/Custom/ButtonWindow.cpp \
25 $(SCREEN_SRC_DIR)/Custom/Window.cpp \
26 $(SCREEN_SRC_DIR)/Custom/WList.cpp \
27 $(SCREEN_SRC_DIR)/Custom/ContainerWindow.cpp \
28 $(SCREEN_SRC_DIR)/Custom/CheckBox.cpp \
29 $(SCREEN_SRC_DIR)/Custom/EditWindow.cpp \
30 $(SCREEN_SRC_DIR)/Custom/TopWindow.cpp \
31 $(SCREEN_SRC_DIR)/Custom/SingleWindow.cpp \
32 $(SCREEN_SRC_DIR)/Custom/Canvas.cpp
34 ifeq ($(TARGET),ANDROID)
35 SCREEN_SOURCES += \
36 $(SCREEN_CUSTOM_SOURCES) \
37 $(SCREEN_SRC_DIR)/OpenGL/EGL.cpp \
38 $(SCREEN_SRC_DIR)/Android/Window.cpp \
39 $(SCREEN_SRC_DIR)/Android/TopWindow.cpp \
40 $(SCREEN_SRC_DIR)/Android/SingleWindow.cpp \
41 $(SCREEN_SRC_DIR)/Android/TopCanvas.cpp \
42 $(SCREEN_SRC_DIR)/Android/Bitmap.cpp \
43 $(SCREEN_SRC_DIR)/Android/Font.cpp
44 endif
46 ifeq ($(FREETYPE),y)
47 SCREEN_SOURCES += \
48 $(SCREEN_SRC_DIR)/FreeType/Font.cpp \
49 $(SCREEN_SRC_DIR)/FreeType/Init.cpp
50 endif
52 ifeq ($(OPENGL),y)
53 SCREEN_SOURCES += \
54 $(SCREEN_SRC_DIR)/OpenGL/Init.cpp \
55 $(SCREEN_SRC_DIR)/OpenGL/Globals.cpp \
56 $(SCREEN_SRC_DIR)/OpenGL/Extension.cpp \
57 $(SCREEN_SRC_DIR)/OpenGL/FBO.cpp \
58 $(SCREEN_SRC_DIR)/OpenGL/VertexArray.cpp \
59 $(SCREEN_SRC_DIR)/OpenGL/Bitmap.cpp \
60 $(SCREEN_SRC_DIR)/OpenGL/RawBitmap.cpp \
61 $(SCREEN_SRC_DIR)/OpenGL/Cache.cpp \
62 $(SCREEN_SRC_DIR)/OpenGL/Canvas.cpp \
63 $(SCREEN_SRC_DIR)/OpenGL/BufferCanvas.cpp \
64 $(SCREEN_SRC_DIR)/OpenGL/TopCanvas.cpp \
65 $(SCREEN_SRC_DIR)/OpenGL/Texture.cpp \
66 $(SCREEN_SRC_DIR)/OpenGL/UncompressedImage.cpp \
67 $(SCREEN_SRC_DIR)/OpenGL/Buffer.cpp \
68 $(SCREEN_SRC_DIR)/OpenGL/Shapes.cpp \
69 $(SCREEN_SRC_DIR)/OpenGL/Surface.cpp \
70 $(SCREEN_SRC_DIR)/OpenGL/Triangulate.cpp
71 endif
73 ifeq ($(ENABLE_SDL),y)
74 SCREEN_SOURCES += $(SCREEN_CUSTOM_SOURCES)
75 SCREEN_SOURCES += \
76 $(SCREEN_SRC_DIR)/Custom/Files.cpp \
77 $(SCREEN_SRC_DIR)/Custom/Bitmap.cpp \
78 $(SCREEN_SRC_DIR)/Custom/LibPNG.cpp \
79 $(SCREEN_SRC_DIR)/Custom/LibJPEG.cpp \
80 $(SCREEN_SRC_DIR)/SDL/Window.cpp \
81 $(SCREEN_SRC_DIR)/SDL/TopWindow.cpp \
82 $(SCREEN_SRC_DIR)/SDL/SingleWindow.cpp \
83 $(SCREEN_SRC_DIR)/SDL/TopCanvas.cpp \
84 $(SCREEN_SRC_DIR)/SDL/Bitmap.cpp \
85 $(SCREEN_SRC_DIR)/SDL/Init.cpp
86 ifeq ($(FREETYPE),n)
87 SCREEN_SOURCES += \
88 $(SCREEN_SRC_DIR)/SDL/Font.cpp
89 endif
90 ifeq ($(OPENGL),n)
91 SCREEN_SOURCES += \
92 $(SCREEN_SRC_DIR)/SDL/UncompressedImage.cpp \
93 $(SCREEN_SRC_DIR)/SDL/Canvas.cpp \
94 $(SCREEN_SRC_DIR)/SDL/Bitmap.cpp \
95 $(SCREEN_SRC_DIR)/SDL/RawBitmap.cpp \
96 $(SCREEN_SRC_DIR)/VirtualCanvas.cpp \
97 $(SCREEN_SRC_DIR)/WindowCanvas.cpp
98 endif
99 else ifeq ($(EGL),y)
100 SCREEN_SOURCES += \
101 $(SCREEN_CUSTOM_SOURCES) \
102 $(SCREEN_SRC_DIR)/Custom/Files.cpp \
103 $(SCREEN_SRC_DIR)/Custom/Bitmap.cpp \
104 $(SCREEN_SRC_DIR)/Custom/LibPNG.cpp \
105 $(SCREEN_SRC_DIR)/Custom/LibJPEG.cpp \
106 $(SCREEN_SRC_DIR)/EGL/Init.cpp \
107 $(SCREEN_SRC_DIR)/EGL/TopCanvas.cpp \
108 $(SCREEN_SRC_DIR)/EGL/Window.cpp \
109 $(SCREEN_SRC_DIR)/EGL/TopWindow.cpp \
110 $(SCREEN_SRC_DIR)/EGL/SingleWindow.cpp
111 else ifeq ($(HAVE_WIN32),y)
112 SCREEN_SOURCES += \
113 $(SCREEN_SRC_DIR)/VirtualCanvas.cpp \
114 $(SCREEN_SRC_DIR)/WindowCanvas.cpp \
115 $(SCREEN_SRC_DIR)/GDI/Init.cpp \
116 $(SCREEN_SRC_DIR)/GDI/Font.cpp \
117 $(SCREEN_SRC_DIR)/GDI/AlphaBlend.cpp \
118 $(SCREEN_SRC_DIR)/GDI/Timer.cpp \
119 $(SCREEN_SRC_DIR)/GDI/Window.cpp \
120 $(SCREEN_SRC_DIR)/GDI/PaintWindow.cpp \
121 $(SCREEN_SRC_DIR)/GDI/ContainerWindow.cpp \
122 $(SCREEN_SRC_DIR)/GDI/TextWindow.cpp \
123 $(SCREEN_SRC_DIR)/GDI/LargeTextWindow.cpp \
124 $(SCREEN_SRC_DIR)/GDI/ButtonWindow.cpp \
125 $(SCREEN_SRC_DIR)/GDI/EditWindow.cpp \
126 $(SCREEN_SRC_DIR)/GDI/SingleWindow.cpp \
127 $(SCREEN_SRC_DIR)/GDI/TopWindow.cpp \
128 $(SCREEN_SRC_DIR)/GDI/Bitmap.cpp \
129 $(SCREEN_SRC_DIR)/GDI/RawBitmap.cpp \
130 $(SCREEN_SRC_DIR)/GDI/Canvas.cpp \
131 $(SCREEN_SRC_DIR)/GDI/BufferCanvas.cpp \
132 $(SCREEN_SRC_DIR)/GDI/PaintCanvas.cpp
133 GDI_CPPFLAGS = -DUSE_GDI
135 ifeq ($(HAVE_CE),y)
136 GDI_LDLIBS = -lcommctrl
137 else
138 GDI_LDLIBS = -lcomctl32 -luser32 -lgdi32 -lmsimg32
139 endif
141 ifeq ($(TARGET),PC)
142 GDI_LDLIBS += -Wl,-subsystem,windows
143 endif
144 endif
146 SCREEN_CPPFLAGS = $(SDL_CPPFLAGS) $(GDI_CPPFLAGS) $(OPENGL_CPPFLAGS) $(FREETYPE_CPPFLAGS) $(LIBPNG_CPPFLAGS) $(LIBJPEG_CPPFLAGS) $(EGL_CPPFLAGS)
147 SCREEN_LDLIBS = $(SDL_LDLIBS) $(GDI_LDLIBS) $(OPENGL_LDLIBS) $(FREETYPE_LDLIBS) $(LIBPNG_LDLIBS) $(LIBJPEG_LDLIBS) $(EGL_LDLIBS)
149 $(eval $(call link-library,screen,SCREEN))
151 SCREEN_LDADD += $(SDL_LDADD)