Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Makefile 594 Bytes
Copy Edit Web IDE Raw Blame History
fens authored 2019-02-27 15:37 . 1.首次上传代码
BIN_DIR=.
OBJ_DIR=.
SRC_DIR=.
LIB_DIR=.
INC_DIR=.
SRCS=$(wildcard $(SRC_DIR)/*.cpp )
OBJS+=$(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS))
TARGET=test
INSTALL_PATH ?= .
ARCH ?=
CC=$(ARCH)gcc
CPP=$(ARCH)g++
AR=$(ARCH)ar
STRIP=$(ARCH)strip
CFLAGS += -Wall -O2 -fno-strict-aliasing -finline-functions
LDFLAGS += -lpthread
CFLAGS += $(foreach dir,$(INC_DIR),-I$(dir))
all:$(TARGET)
$(TARGET): $(OBJS)
$(CPP) $(OBJS) -o $@ $(CFLAGS) $(LDFLAGS)
$(STRIP) $(TARGET)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CPP) $(CFLAGS) -c $< -o $@
clean:
-rm $(OBJS)
-rm $(TARGET)
#@echo $(OBJS)

Comment ( 0 )

Sign in for post a comment