Makefile 612 B

1234567891011121314151617181920212223242526
  1. PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
  2. OBJS = androidmanifesteditor.o ResStringPool.o ResXMLTreeNode.o ResValue.o XMLNameSpace.o
  3. ifeq ($(BUILD_MODE),debug)
  4. CFLAGS += -g
  5. else ifeq ($(BUILD_MODE),run)
  6. CFLAGS += -O2
  7. else
  8. $(error Build mode $(BUILD_MODE) not supported by this Makefile)
  9. endif
  10. all: androidmanifesteditor
  11. androidmanifesteditor: $(OBJS)
  12. $(CXX) -o $@ $^
  13. %.o: $(PROJECT_ROOT)%.cpp
  14. $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
  15. %.o: $(PROJECT_ROOT)%.c
  16. $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
  17. clean:
  18. rm -fr androidmanifesteditor $(OBJS)