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