From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver] / android / project / xscreensaver / jni / Android.mk
1 LOCAL_PATH := $(call my-dir)/../../../..
2
3 include $(CLEAR_VARS)
4
5 LOCAL_MODULE := xscreensaver
6
7 # The base framework files:
8 LOCAL_SRC_FILES := \
9     android/screenhack-android.c \
10     jwxyz/jwxyz-android.c \
11     jwxyz/jwxyz-common.c \
12     jwxyz/jwxyz-gl.c \
13     jwxyz/jwxyz-timers.c \
14     jwxyz/jwzgles.c \
15
16 # Utilities used by the hacks:
17 LOCAL_SRC_FILES += \
18     hacks/analogtv.c \
19     hacks/delaunay.c \
20     hacks/fps.c \
21     hacks/glx/dropshadow.c \
22     hacks/glx/chessmodels.c \
23     hacks/glx/fps-gl.c \
24     hacks/glx/gltrackball.c \
25     hacks/glx/glut_stroke.c \
26     hacks/glx/glut_swidth.c \
27     hacks/glx/grab-ximage.c \
28     hacks/glx/marching.c \
29     hacks/glx/normals.c \
30     hacks/glx/rotator.c \
31     hacks/glx/sphere.c \
32     hacks/glx/texfont.c \
33     hacks/glx/trackball.c \
34     hacks/glx/tube.c \
35     hacks/glx/xpm-ximage.c \
36     hacks/xlockmore.c \
37     hacks/xpm-pixmap.c \
38     utils/async_netdb.c \
39     utils/aligned_malloc.c \
40     utils/colorbars.c \
41     utils/colors.c \
42     utils/erase.c \
43     utils/grabclient.c \
44     utils/hsv.c \
45     utils/logo.c \
46     utils/minixpm.c \
47     utils/pow2.c \
48     utils/resources.c \
49     utils/spline.c \
50     utils/textclient-mobile.c \
51     utils/thread_util.c \
52     utils/usleep.c \
53     utils/utf8wc.c \
54     utils/xft.c \
55     utils/xshm.c \
56     utils/yarandom.c \
57
58 # The source files of all of the currently active hacks:
59 LOCAL_SRC_FILES += $(shell \
60   for f in $$ANDROID_HACKS ; do \
61     if [ "$$f" = "companioncube" ]; then f="companion"; fi ; \
62     if [ -f "../../../../hacks/$$f.c" ]; then \
63       echo "hacks/$$f.c" ; \
64     else \
65       echo "hacks/glx/$$f.c" ; \
66     fi ; \
67   done )
68
69 # Some savers occupy more than one source file:
70 LOCAL_SRC_FILES += \
71     hacks/apple2-main.c \
72     hacks/asm6502.c \
73     hacks/pacman_ai.c \
74     hacks/pacman_level.c \
75     hacks/glx/b_draw.c \
76     hacks/glx/b_lockglue.c \
77     hacks/glx/b_sphere.c \
78     hacks/glx/buildlwo.c \
79     hacks/glx/companion_quad.c \
80     hacks/glx/companion_disc.c \
81     hacks/glx/companion_heart.c \
82     hacks/glx/cow_face.c \
83     hacks/glx/cow_hide.c \
84     hacks/glx/cow_hoofs.c \
85     hacks/glx/cow_horns.c \
86     hacks/glx/cow_tail.c \
87     hacks/glx/cow_udder.c \
88     hacks/glx/dolphin.c \
89     hacks/glx/gllist.c \
90     hacks/glx/glschool_alg.c \
91     hacks/glx/glschool_gl.c \
92     hacks/glx/involute.c \
93     hacks/glx/lament_model.c \
94     hacks/glx/pipeobjs.c \
95     hacks/glx/robot.c \
96     hacks/glx/robot-wireframe.c \
97     hacks/glx/polyhedra-gl.c \
98     hacks/glx/s1_1.c \
99     hacks/glx/s1_2.c \
100     hacks/glx/s1_3.c \
101     hacks/glx/s1_4.c \
102     hacks/glx/s1_5.c \
103     hacks/glx/s1_6.c \
104     hacks/glx/s1_b.c \
105     hacks/glx/seccam.c \
106     hacks/glx/shark.c \
107     hacks/glx/sonar-sim.c \
108     hacks/glx/sonar-icmp.c \
109     hacks/glx/splitflap_obj.c \
110     hacks/glx/sproingiewrap.c \
111     hacks/glx/stonerview-move.c \
112     hacks/glx/stonerview-osc.c \
113     hacks/glx/stonerview-view.c \
114     hacks/glx/swim.c \
115     hacks/glx/tangram_shapes.c \
116     hacks/glx/teapot.c \
117     hacks/glx/toast.c \
118     hacks/glx/toast2.c \
119     hacks/glx/toaster.c \
120     hacks/glx/toaster_base.c \
121     hacks/glx/toaster_handle.c \
122     hacks/glx/toaster_handle2.c \
123     hacks/glx/toaster_jet.c \
124     hacks/glx/toaster_knob.c \
125     hacks/glx/toaster_slots.c \
126     hacks/glx/toaster_wing.c \
127     hacks/glx/tronbit_idle1.c \
128     hacks/glx/tronbit_idle2.c \
129     hacks/glx/tronbit_no.c \
130     hacks/glx/tronbit_yes.c \
131     hacks/glx/tunnel_draw.c \
132     hacks/glx/whale.c \
133
134 LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lEGL -latomic
135
136 LOCAL_C_INCLUDES := \
137         $(LOCAL_PATH) \
138         $(LOCAL_PATH)/android \
139         $(LOCAL_PATH)/utils \
140         $(LOCAL_PATH)/jwxyz \
141         $(LOCAL_PATH)/hacks \
142         $(LOCAL_PATH)/hacks/glx \
143
144 # -Wnested-externs would also be here, but for Android unistd.h.
145 LOCAL_CFLAGS += \
146         -std=c99 \
147         -Wall \
148         -Wstrict-prototypes \
149         -Wmissing-prototypes \
150         -DSTANDALONE=1 \
151         -DHAVE_ANDROID=1 \
152         -DUSE_GL=1 \
153         -DHAVE_JWXYZ=1 \
154         -DJWXYZ_GL=1 \
155         -DHAVE_JWZGLES=1 \
156         -DHAVE_XUTF8DRAWSTRING=1 \
157         -DHAVE_GLBINDTEXTURE=1 \
158         -DGL_VERSION_ES_CM_1_0 \
159         -DHAVE_UNISTD_H=1 \
160         -DHAVE_INTTYPES_H=1 \
161         -DHAVE_UNAME=1 \
162         -DHAVE_UTIL_H=1 \
163         -DGETTIMEOFDAY_TWO_ARGS=1 \
164         -DHAVE_ICMP=1 \
165         -DHAVE_PTHREAD=1 \
166
167 include $(BUILD_SHARED_LIBRARY)