1 2 NDK_BASE := ../.. 3 4 include $(NDK_BASE)/config/config.mk 5 6 EXECUTABLE := hello 7 SOURCES := hello.c 8 OBJECTS := $(SOURCES:.c=.o) 9 LIBS := -lc -lm 10 11 all: $(EXECUTABLE) 12 13 # need $(LINK) before all objects and $(POSTLINK) after all objects for 14 # android runtime setup. 15 16 hello: $(OBJECTS) 17 $(CC) $(LINK) -o $@ $(OBJECTS) $(LIBS) $(POSTLINK) 18 19 clean: 20 rm -rf *.o hello 21 22