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

📄 makefile

📁 这是一个C程序分析工具
💻
字号:
#===================================================================
#   FILE   :   @(#)Makefile	2.3  -  03/14/00
#===================================================================
#       PURPOSE: Make file for the Recon system (Unix)
#
#       Creates subsystems program for the Recon system
#
#  SYSTEM : RECON II
#       Created by: H. Maranon, February 1997
#===================================================================
#
#===================================================================
#           GENERAL MACRO DEFINITIONS  block
#===================================================================

# The CC macro is used to expand the compiler name in its place.
# In other words, whenever CC appears it will be substituted with
# gcc or the compiler defined by the CC macro.
#
CC = gcc

# The CFLAGS macro is used to expand the compiler flags/options.
CFLAGS =  -c

# The OSFLAG macro is used to expand the platform specific flags.
OSFLAG = -DSYS_UNIX

# The -DNDEBUG macro is used to expand debugging flags.
DBFLAG = -DNDEBUG

# The following special target name is used to prevent the echoing
# of every command the makefile is executing. If you want to see
# all the commands being executed by this makefile while compiling
# recon or any subsystem (dependency lines below), comment the
# following line by adding the "#" at the beginning of the line.
# Note: the SILENT mode still displays all warnings, error messages
# and any command with @echo at the beginning of the line..

.SILENT:

# Redefine the suffix rule to use above macro definitions.
# The following lines state that for any source file (*.c)
# use the compiler and flags indicated by these macros to
# generate the object files (*.o). 
# The "$<" symbol represents the name of the current prerequisite
# or source file that has been modified more recently than the
# current target.

.c.o :
	${CC} ${CFLAGS} ${OSFLAG} $<

#===================================================================
#          MACRO DEFINITIONS FOR R2ANALYZ (UNIX)
#===================================================================
#
# The following Analysis macro definitions were set up to allow 
# the user  to compile r2analyz by simply typing:
# 
# make r2analyz
#
# Instead of typing the following long command:
#
# gcc -o r2analyz -DSYS_UNIX -DNDEBUG r2analyz.c r2annote.c  \ 
#         r2outset.c r2build.c r2clist.c r2read.c r2select.c \
#         r2tlist.c r2util.c r2btree.c
#
#===================================================================
#

# The following macro contains all the source files used by 
# the r2analyz subsystem.
# Note: the forward slash character ("\") indicates line continuation
#

ANALZSCR  = r2analyz.c   r2annote.c  r2outset.c   r2build.c    \
            r2clist.c    r2read.c    r2select.c   r2tlist.c  r2util.c \
            r2btree.c

# The following is a way to create a macro by using the content of
# another macro. In this case the new macro is formed by taking all the
# source file names from the ANALZSCR macro and replacing the source
# file extensions (.c) with the object file extensions (.o).
# This technique is known as a macro string substitution and it will
# be used in a number of places in this description file.
#

ANALOBJS = ${ANALZSCR:.c=.o}

# Since each source file in the r2analyz subsystem has its own header
# file named the same as the source file, except for the extension of
# course, we can use  the same technique to create a macro definition 
# for the header files.  

ANALZHDS  = ${ANALOBJS:.o=.h}


#===================================================================
#          MACRO DEFINITIONS FOR R2INST (UNIX)
#===================================================================
# Macro definitions for the r2inst (Unix)
#
# The following instrumentation macro definitions were set up 
# to allow the user to compile r2inst by simply typing:
# 
# make r2inst
#
# Instead of typing the following long command:
#
# gcc -o r2inst -DSYS_UNIX r2inst.c instfile.c instpars.c   \
#                  instrmnt.c  instlink.c  instutil.c vb_print.c
#===================================================================

# The following macro contains all the source files used by 
# the r2inst subsystem
#

INSTSCRS  = r2inst.c   instfile.c  instpars.c  instrmnt.c  \
	    instutil.c  instlink.c vb_print.c

# Now, we create a macro for the r2inst object files by using the
# macro string substitution technique described above.

INSTOBJS = $(INSTSCRS:.c=.o)

#=====================================================================
#                    LINE DEPENDENCY SECTION
#=====================================================================
# This section contains all the lines that will be checked by make
# before starts compiling the system. The lines in this section are
# called dependency lines because the section preceding the ":" at the
# beginning of the line is dependent on the sections following the ":".
# The first dependent line (in this case "all:") is the default line that
# gets executed whenever the user types "make". This line will build or
# make all subsystem for the recon program.

all:   r2analyz  r2inst r2end  r2test  r2endq  r2testq 

#======================================================================

# In order to make the analysis subsystem, we need all the source files
# that make up r2analys in the current directory.  If an SCCS directory 
# exist under the current directory directory, make will automatically
# perform an "SCCS get" to get the necessary files.
# The dependency is the object files needed, which will be produce
# by compiling the source code files for r2analyz. Since each
# object file is also dependent on the source files and header files
# reference by the source file, each object file becomes a dependency 
# line also.

r2analyz: $(ANALOBJS) 
	@echo "*********   CREATING ANALYSIS SUBSYSTEM (r2analyz).........."
	$(CC) -o $@ ${OSFLAG} ${DBFLAG} ${ANALOBJS}
	@echo "********* r2analyz SUBSYSTEM COMPILED SUCCESSFULLY!! *******"

# dependencies for the analysis subsystem object files

r2analyz.o : r2analyz.c ${ANALZHDS} r2.h

r2annote.o : r2annote.c r2annote.h r2analyz.h r2clist.h r2util.h

r2outset.o : r2outset.c r2outset.h r2analyz.h r2clist.h r2util.h 

r2build.o : r2build.c r2build.h r2analyz.h r2tlist.h r2clist.h r2util.h

r2clist.o : r2clist.c r2clist.h r2analyz.h r2util.h

r2read.o : r2read.c r2read.h r2analyz.h r2tlist.h r2util.h

r2select.o : r2select.c r2select.h r2analyz.h r2clist.h r2util.h

r2tlist.o : r2tlist.c r2tlist.h r2analyz.h

r2util.o : r2util.c r2util.h r2analyz.h

#===========================================================================

# The technique to make the instrumentation subsystem is the same as
# above, the dependency lines for this subsystem are listed below.

r2inst: $(INSTOBJS)
	@echo "*********   CREATING INSTRUMENTATION SUBSYSTEM (r2inst)....."
	$(CC) -o $@ $(OSFLAG) $(INSTOBJS)
	@echo "********* r2inst SUBSYSTEM COMPILED SUCCESSFULLY!! *********"

# dependencies for the instrumentation subsystem object files.

r2inst.o : r2inst.c r2.h r2inst.h instpars.h instrmnt.h instlink.h \
	instfile.h vb_print.h

instfile.o : instfile.c r2.h r2inst.h instfile.h instlink.h \
	instutil.h instpars.h vb_print.h

instlink.o : instlink.c r2.h r2inst.h instlink.h vb_print.h

instpars.o : instpars.c r2.h r2inst.h instrmnt.h instutil.h \
	vb_print.h

instrmnt.o : instrmnt.c r2.h r2inst.h instlink.h instpars.h \
	instrmnt.h instfile.h instutil.h vb_print.h

instutil.o : instutil.c r2.h r2inst.h instutil.h vb_print.h

vb_print.o : vb_print.c vb_print.h

#===========================================================================
# The r2test subsystem dependency line is as follows: 

r2test: r2test.o
	@echo "*********   CREATING TESTING SUBSYSTEM (r2test)............."
	$(CC) -o $@ $(OSFLAG) r2test.o 
	@echo "********* r2test SUBSYSTEM COMPILED SUCCESSFULLY!! *********"

#===========================================================================
# The r2end subsystem dependency line is as follows:

r2end:  r2end.o
	@echo "*********   CREATING TESTING SUBSYSTEM (r2end).............."
	$(CC) -o $@ $(OSFLAG) r2end.o 
	@echo "********* r2end SUBSYSTEM COMPILED SUCCESSFULLY!! **********"

#===========================================================================
# The r2testq subsystem dependency line is as follows:

r2testq:  r2testq.o
	@echo "*********   CREATING TESTING SUBSYSTEM (r2testq)............"
	@echo "*********     FOR MULTI-PROCESS UNIX PROGRAMS     **********"
	@echo "************************************************************"
	@echo "*********              NOTE TO USERS              **********"
	@echo "************************************************************"
	@echo " This subsystem allows RECON to be used with multi-process"
	@echo " programs.  Potential errors may occur during compilation"
	@echo " of this file if your system does not have the utilities"
	@echo " required for successful compilation of this file.  If you"
	@echo " encounter errors, you can delete the r2testq.o file from"
	@echo " your source directory and modify the makefile to remove"
	@echo " the dependency lines that are used to compile this"
	@echo " subsystem.  This action should NOT affect your ability to"
	@echo " use RECON for single process programs."
	@echo "************************************************************"
	sleep 6
	$(CC) -o $@ $(OSFLAG) r2testq.o 
	@echo "********* r2testq SUBSYSTEM COMPILED SUCCESSFULLY!! ********"

#===========================================================================
# The r2endq subsystem dependency line is as follows:

r2endq:  r2endq.o
	@echo "*********   CREATING TESTING SUBSYSTEM (r2endq)............."
	@echo "*********     FOR MULTI-PROCESS UNIX PROGRAMS     **********"
	@echo "************************************************************"
	@echo "*********              NOTE TO USERS              **********"
	@echo "************************************************************"
	@echo " This subsystem allows RECON to be used with multi-process"
	@echo " programs.  Potential errors may occur during compilation"
	@echo " of this file if your system does not have the utilities"
	@echo " required for successful compilation of this file.  If you"
	@echo " encounter errors, you can delete the r2endq.o file from"
	@echo " your source directory and modify the makefile to remove"
	@echo " the dependency lines that are used to compile this"
	@echo " subsystem.  This action should NOT affect your ability to"
	@echo " use RECON for single process programs."
	@echo "************************************************************"
	sleep 6
	$(CC) -o $@ $(OSFLAG) r2endq.o 
	@echo "********* r2endq SUBSYSTEM COMPILED SUCCESSFULLY!! *********"

#===========================================================================
# The dependency line for removing object files from the
# working directory is as follows:

clean:
	rm -f *.o

# The following dependency line is also provided to remove object and
# executable files from the working directory:

clobber:
	rm -f r2analyz r2inst r2end r2test r2endq r2testq *.o

⌨️ 快捷键说明

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