Commit b27abd20 authored by Jan Eitzinger's avatar Jan Eitzinger
Browse files

Adapt Makefile to newer template

parent 48787ece
...@@ -63,51 +63,53 @@ $(BUILD_DIR)/%.o: %.c ...@@ -63,51 +63,53 @@ $(BUILD_DIR)/%.o: %.c
$(Q)$(GCC) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d $(Q)$(GCC) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d
$(BUILD_DIR)/%.s: %.c $(BUILD_DIR)/%.s: %.c
@echo "===> GENERATE ASM $@" $(info ===> GENERATE ASM $@)
$(CC) -S $(CPPFLAGS) $(CFLAGS) $< -o $@ $(CC) -S $(CPPFLAGS) $(CFLAGS) $< -o $@
$(BUILD_DIR)/%.s: %.f90 $(BUILD_DIR)/%.s: %.f90
@echo "===> COMPILE $@" $(info ===> GENERATE ASM $@)
$(Q)$(FC) -S $(FCFLAGS) $< -o $@ $(Q)$(FC) -S $(FCFLAGS) $< -o $@
$(BUILD_DIR)/%.o: %.cc $(BUILD_DIR)/%.o: %.cc
@echo "===> COMPILE $@" $(info ===> COMPILE $@)
$(Q)$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ $(Q)$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
$(Q)$(CXX) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d $(Q)$(CXX) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d
$(BUILD_DIR)/%.o: %.cpp $(BUILD_DIR)/%.o: %.cpp
@echo "===> COMPILE $@" $(info ===> COMPILE $@)
$(Q)$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ $(Q)$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
$(Q)$(CXX) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d $(Q)$(CXX) $(CPPFLAGS) -MT $(@:.d=.o) -MM $< > $(BUILD_DIR)/$*.d
$(BUILD_DIR)/%.o: %.f90 $(BUILD_DIR)/%.o: %.f90
@echo "===> COMPILE $@" $(info ===> COMPILE $@)
$(Q)$(FC) -c $(FCFLAGS) $< -o $@ $(Q)$(FC) -c $(FCFLAGS) $< -o $@
$(BUILD_DIR)/%.o: %.F90 $(BUILD_DIR)/%.o: %.F90
@echo "===> COMPILE $@" $(info ===> COMPILE $@)
$(Q)$(FC) -c $(CPPFLAGS) $(FCFLAGS) $< -o $@ $(Q)$(FC) -c $(CPPFLAGS) $(FCFLAGS) $< -o $@
tags: .PHONY: clean distclean tags info asm
@echo "===> GENERATE TAGS"
$(Q)ctags -R
$(BUILD_DIR):
@mkdir $(BUILD_DIR)
ifeq ($(findstring $(MAKECMDGOALS),clean),)
-include $(OBJ:.o=.d)
endif
.PHONY: clean distclean
clean: clean:
@echo "===> CLEAN" $(info ===> CLEAN)
@rm -rf $(BUILD_DIR) @rm -rf $(BUILD_DIR)
@rm -f tags @rm -f tags
distclean: clean distclean: clean
@echo "===> DIST CLEAN" $(info ===> DIST CLEAN)
@rm -f $(TARGET) @rm -f $(TARGET)
@rm -f tags
info:
$(info $(CFLAGS))
$(Q)$(CC) $(VERSION)
asm: $(BUILD_DIR) $(ASM)
tags:
$(info ===> GENERATE TAGS)
$(Q)ctags -R
$(BUILD_DIR):
@mkdir $(BUILD_DIR)
-include $(OBJ:.o=.d)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment