You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
Makefile
43 lines
1.1 KiB
Makefile
4 months ago
|
|
||
|
YAML_CPP_OBJ = $(shell find * -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g")
|
||
|
YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%)
|
||
|
YAML_CPP_H = $(shell find * -type f -name "*.h")
|
||
|
YAML_CPP_AR = obj/yaml-cpp.a
|
||
|
|
||
|
CXXFLAG =-std=c++17 -DYAML_CPP_STATIC_DEFINE
|
||
|
INC=-Iinclude
|
||
|
|
||
|
@SET_MAKE@
|
||
|
|
||
|
#####################################################################
|
||
|
.PHONY : all clean help yaml-cpp
|
||
|
|
||
|
all: yaml-cpp
|
||
|
|
||
|
clean:
|
||
|
@echo " CLEAN yaml-cpp"
|
||
|
@rm -rf obj *.o
|
||
|
|
||
|
help:
|
||
|
@echo "possible targets are 'all' 'clean' 'help'"
|
||
|
@echo "'yaml-cpp' - build $(YAML_CPP_AR)
|
||
|
@echo "'all' - builds $(YAML_CPP_DIR_OBJ)"
|
||
|
@echo "'clean' - deletes $(YAML_CPP_DIR_OBJ)"
|
||
|
@echo "'help' - outputs this message"
|
||
|
|
||
|
#####################################################################
|
||
|
|
||
|
obj:
|
||
|
@echo " MKDIR obj/src/contrib"
|
||
|
@mkdir -p obj/src/contrib
|
||
|
|
||
|
obj/%.o: %.cpp $(YAML_CPP_H)
|
||
|
@echo " CXX $<"
|
||
|
@@CXX@ $(CXXFLAG) @CFLAGS_AR@ @CPPFLAGS@ -g $(INC) -c $(OUTPUT_OPTION) $<
|
||
|
|
||
|
yaml-cpp: obj $(YAML_CPP_DIR_OBJ) $(YAML_CPP_AR)
|
||
|
|
||
|
$(YAML_CPP_AR): $(YAML_CPP_DIR_OBJ)
|
||
|
@echo " AR $@"
|
||
|
@@AR@ rcs obj/yaml-cpp.a $(YAML_CPP_DIR_OBJ)
|