CXX= $(CROSS_COMPILE)g++
CC = $(CROSS_COMPILE)gcc
CXX_FLAGS = -Wall -g
LD_FLAGS = -lpthread
NAME = comt
C_FLAGS = -g
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) $(patsubst %.cpp, %.o, $(wildcard *.cpp))
all:
.PHONY: all clean
$(NAME):$(OBJECTS)
$(CXX) $(LD_FLAGS) -o $@ $^
chmod 777 $(NAME)
all:$(NAME)
@echo Done!
$(OBJECTS): %.o : %.cpp
@echo "Compile $@ ($<)."
@$(CXX) $(CXX_FLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(NAME)
阅读(921) | 评论(0) | 转发(0) |