You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.inc 466B

8 years ago
8 years ago
1234567891011121314151617181920212223242526272829
  1. OBJECTS += $(patsubst %, build/%.o, $(SOURCES))
  2. DEPS = $(patsubst %, build/%.d, $(SOURCES))
  3. # Final targets
  4. $(TARGET): $(OBJECTS)
  5. $(CXX) -o $@ $^ $(LDFLAGS)
  6. # Object targets
  7. -include $(DEPS)
  8. build/%.c.o: %.c
  9. @mkdir -p $(@D)
  10. $(CC) $(CFLAGS) -c -o $@ $<
  11. build/%.cpp.o: %.cpp
  12. @mkdir -p $(@D)
  13. $(CXX) $(CXXFLAGS) -c -o $@ $<
  14. build/%.cc.o: %.cc
  15. @mkdir -p $(@D)
  16. $(CXX) $(CXXFLAGS) -c -o $@ $<
  17. build/%.m.o: %.m
  18. @mkdir -p $(@D)
  19. $(CC) $(CFLAGS) -c -o $@ $<