⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 C++ source code for book-C++ and Object Oriented Numeric computing for scientists and engineers
💻
字号:
############################################################
# Makefile for matrix manipulations
#               Daoqi Yang  June 2, 1996
############################################################

INCL=-I/usr/local/libg++/lib/g++-include
BASE = /home/yang/book/cc1/chapter11
#CC   = CC 
CC   = g++ 
CFLAGS = -g $(INCL)
# -c       compile only, generate corresponding .o files
# -g       generate code suitable for the debugger
# -p       generate code suitable for the profiler
# -O       attemp code optimizations

INCLS  = -I$(BASE)/gcc2.7.2.3   # where to look for include files
EFILE  = $(BASE)/gcc2.7.2.3/xx   # name of executable file
EFILE2 = $(BASE)/gcc2.7.2.3/yy   # name of executable file

# libraries to be used
LIBS = -lm                    # for math library
#LIBS = -lm                   # for math library
#      -lrpcsvc               # for function "rstat" 
#LIBS = -lm $(BASE)/lib/linpack.a
# To make a library:
#    ar ruv mylib.a file1.o file2.o   and:  ranlib mylib.a
# To see a libaray: ar t mylib.a
MAKELIB = $(BASE)/gcc2.7.2.3/matveclib.a

#header files
HDRS = matvec.h 

OBJS = main.o matvec.o 
#OBJS = matvec.o 
OBJS2 = matvec.o 

xx: $(OBJS) 
	@echo "linking ..."
	$(CC) $(CFLAGS) -o $(EFILE) $(OBJS) $(LIBS) 

$(OBJS): $(HDRS)
	$(CC) $(CFLAGS) $(INCLS) -c $*.cc

lib:
	ar ruv  $(MAKELIB) $(OBJS2)
	ranlib $(MAKELIB)

clean:
	/bin/rm $(OBJS) xx

# Dependencies list
main.o: main.cc
matvec.o: matvec.cc
ttt.o: ttt.cc
gm.o: gm.cc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -