makefile

来自「利用XML来作为Makefile的make工具源代码.」· 代码 · 共 42 行

TXT
42
字号
#make file for xmake

#this is the output directory
OUTDIR=./Objects

#this is the install directory - you must root privilege
#to install the software
INSTALLDIR=/usr/local/bin

OBJFILES=$(OUTDIR)/StdAfx.o $(OUTDIR)/CmdLine.o $(OUTDIR)/XMLParser.o $(OUTDIR)/xmake.o
CXX=g++ -DGCC -I../ -c 

#this is the default to build 
xmake : $(OBJFILES)
	g++ -o $(OUTDIR)/xmake $(OBJFILES); cp $(OUTDIR)/xmake ./

$(OUTDIR)/StdAfx.o : StdAfx.cpp StdAfx.h
	cd $(OUTDIR); $(CXX) ../StdAfx.cpp

$(OUTDIR)/CmdLine.o : CmdLine.cpp CmdLine.h
	cd $(OUTDIR); $(CXX) ../CmdLine.cpp

$(OUTDIR)/XMLParser.o : XMLParser.cpp XMLParser.h
	cd $(OUTDIR); $(CXX) ../XMLParser.cpp

$(OUTDIR)/xmake.o : xmake.cpp xmake.h
	cd $(OUTDIR); $(CXX) ../xmake.cpp

#this will remove the binary .o files
clean : 
	rm $(OBJFILES)

#this will install xmake on your system - you must be 
#logged in as root for this to work
install :
	cp $(OUTDIR)/xmake $(INSTALLDIR)/; strip $(INSTALLDIR)/xmake; echo xmake is now installed!

#this will uninstall xmake from your system - you must 
#be logged in as root to do this
uninstall :
	rm $(INSTALLDIR)/xmake; echo xmake is now removed from your system 

⌨️ 快捷键说明

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