droid-makefile 524 B

12345678910111213141516171819202122232425262728
  1. APP := lib$(PROJECT)_$(MARCH).$(EXT)
  2. CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I./src
  3. LDFLAGS := -ltinySAK_$(MARCH) $(LDFLAGS_LIB)
  4. all: $(APP)
  5. OBJS = \
  6. src/tipsec.o
  7. $(APP): $(OBJS)
  8. ifeq ($(EXT), a)
  9. $(AR) rcs $@ $^
  10. else
  11. $(CC) $(LDFLAGS) -o $@ $^
  12. endif
  13. %.o: %.c
  14. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  15. install: $(APP)
  16. $(ANDROID_SDK_ROOT)/tools/adb remount
  17. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
  18. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
  19. clean:
  20. @rm -f $(OBJS) $(APP)