Android makefile: build all sources in a directory tree instead of listing files one by one

Go To StackoverFlow.com

0

I'm porting an iPhone game (c++) to Android and I'm just getting started with this.

In the Android.mk file I have to list all the source files that need to be built, something like this:

LOCAL_SRC_FILES := importgl.c demo.c etc.c

The game I'm porting consists of hundreds of .cpp files, is there any way to include all the sources in a directory tree?

EDIT: Maybe is there any way to make eclipse update the makefile automatically?

2012-04-05 19:24
by Damian


0

What's about using wildcard function?

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
2012-04-05 21:34
by Eldar Abusalimov
Ads