fix compilation errors related to C specifics

This commit is contained in:
2020-02-05 16:14:52 +04:00
parent ef055f0324
commit cdacdce8e5
29 changed files with 93 additions and 92 deletions
+4 -4
View File
@@ -34,11 +34,11 @@ DATE_BUILD = $(shell date +"%D %T")
#source and header files search path. add here new directories which contains files specified for $(SRC)
VPATH = ./ ./dwarf ./arch ./utils
SRC = $(wildcard $(addsuffix /*.cpp,${VPATH}))
OBJ = $(patsubst %.cpp,%.o,$(addprefix $(BUILD_DIR)/,$(notdir $(SRC))))
SRC = $(wildcard $(addsuffix /*.c,${VPATH}))
OBJ = $(patsubst %.c,%.o,$(addprefix $(BUILD_DIR)/,$(notdir $(SRC))))
INCS = -I"./dwarf" -I"./" -I"./utils" -I"./arch"
FLAGS = -Wall -ggdb -fPIC -O3 -rdynamic -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DSOFT_BUILD=$(SOFT_BUILD) -DUSER_BUILD=$(USER) -DDATE_BUILD="$(DATE_BUILD)"
FLAGS = -Wall -ggdb -fPIC -O3 -rdynamic -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DSOFT_BUILD=$(SOFT_BUILD) -DUSER_BUILD=$(USER) -DDATE_BUILD="$(DATE_BUILD)"
.PHONY: all clean
@@ -57,7 +57,7 @@ $(RESULT_DIR)/prepare.res:
@if [ ! -e $(RESULT_DIR) ]; then mkdir -vp $(RESULT_DIR); fi
@touch $@
$(BUILD_DIR)/%.o: %.cpp
$(BUILD_DIR)/%.o: %.c
#compile source code directly to $BUILD_DIR directory
@printf "Building %-60s" $@
@OUT=$$($(CXX) $(COLOR) -o $@ -c $< $(FLAGS) $(INCS) 2>&1); \