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