1 Star 0 Fork 0

zhoub86/entropy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
Pengkun Yang 提交于 2016-02-15 15:42 . Fix warnings.
MAKEFILE = Makefile
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -std=c++14 # -Wextra -pedantic
CFLAGS = -O2 -Wall $(DEFINES)
CXXFLAGS = -O2 -Wall $(DEFINES)
INCPATH = -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) # -lpthread -lstdc++
AR = ar cqs
RANLIB =
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = cp -f
COPY_DIR = cp -f -R
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES =
OBJECTS = entropy.o main.o main_test.o commandline.o ## TODO: add all corresponding .o files here
DIST =
DESTDIR = #avoid trailing-slash linebreak
TARGET = test entropy
first: all
####### Implicit rules
# .SUFFIXES: .o .c .cpp .cc .cxx .C
# .cpp.o:
# $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
# .cc.o:
# $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
# .cxx.o:
# $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
# .C.o:
# $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
# .c.o:
# $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
####### Build rules
all: $(TARGET)
test: entropy.o main_test.o
$(LINK) $(LFLAGS) entropy.o main_test.o $(LIBS) -o test
entropy: entropy.o main.o commandline.o
$(LINK) $(LFLAGS) entropy.o main.o commandline.o $(LIBS) -o entropy
# $(TARGET): $(OBJECTS)
# $(LINK) $(LFLAGS) $(OBJECTS) $(OBJCOMP) $(LIBS) -o $(TARGET)
dist:
@test -d .tmp/test1.0.0 || mkdir -p .tmp/test1.0.0
$(COPY_FILE) --parents $(DIST) .tmp/test1.0.0/ && $(COPY_FILE) --parents hello.h .tmp/test1.0.0/ && $(COPY_FILE) --parents hello.cpp main.cpp .tmp/test1.0.0/ && (cd `dirname .tmp/test1.0.0` && $(TAR) test1.0.0.tar test1.0.0 && $(COMPRESS) test1.0.0.tar) && $(MOVE) `dirname .tmp/test1.0.0`/test1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/test1.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
distclean: clean
-$(DEL_FILE) $(TARGET)
####### Sub-libraries
check: first
compiler_clean:
####### Compile
# TODO: add all dependencies for the .o
commandline.o: commandline.cpp commandline.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o commandline.o commandline.cpp
entropy.o: entropy.cpp entropy.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o entropy.o entropy.cpp
main_test.o: main_test.cpp entropy.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main_test.o main_test.cpp
main.o: main.cpp entropy.h commandline.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoub86/entropy.git
git@gitee.com:zhoub86/entropy.git
zhoub86
entropy
entropy
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385