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

📄 makefile

📁 C++ source code for book-C++ and Object Oriented Numeric computing for scientists and engineers
💻
字号:
############################################################
# Makefile for 
# C++ and Object Oriented Numeric Computing
# for Scientists and Engineers.
#               Daoqi Yang  July 17, 2001 
############################################################

BASE = /home/yang/book/ccnc/chapter11

CC   = /home/yang/gcc/usr/local/bin/g++ 
#CC   = CC 

CFLAGS = -g
# -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

# where to look for include files
INCLS  = -I/home/yang/gcc/usr/local/include/g++-v3

EFILE  = $(BASE)/gcc3.0/xx    # name of executable file

# libraries to be used
LIBS = -L/home/yang/gcc/usr/local/lib -lm
#      -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)/gcc3.0/matveclib.a

#header files
HDRS = matvec.h 

OBJS = matvecmain.o matvec.o 
OBJS2 = matvec.o 

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

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

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

#$(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

⌨️ 快捷键说明

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