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

📄 makefile

📁 linux下的一个分组遗传算法
💻
字号:
## Makefile## A Makefile for projects that requires minimal adaptation.# Only the variables before the line of #'s should be changed.# Be sure to have all your source files in the same directory# as this Makefile, and no extra source files, as it will try# to compile all files with $(SUFFIX) as its suffix.## Author : J.I.v.Hemert# Version: 1.2#### Targets ###TITLE = src-projectBIN = ggaDISTNAME = projectTAGSFILE = tagsTARSUFFIX = .tar.gz### Directories ###BINDIR = ../binDEBUGDIR = ../debug### Misc ###SUFFIX = ccVPATH = .MACHINE = `uname`### Flags ####-ldmalloc LIBS = -lm #-lccmalloc -ldlLIBPATH = -L/home/jvhemert/lib/$(MACHINE)INCPATH = -I/home/jvhemert/includeLDFLAGS = -gCFLAGS = -Wall -O3CPPFLAGS = -Wall -O3TAGSFLAGS = -t -o $(TAGSFILE)DEFINES = -D$(MACHINE)TARFLAGS = cfzRMFLAGS = -f### Progs ###RM = rm $(RMFLAGS)CC = g++LINKER = $(CC)CTAGS = ctags $(TAGSFLAGS)TAR = tar $(TARFLAGS)SHELL = /bin/shMOVE = mv##############################################################               NO CHANGES FROM HERE ON                     ##############################################################OFILES = $(patsubst %.$(SUFFIX),%.o,$(wildcard *.$(SUFFIX)))HFILES = $(patsubst %.$(SUFFIX),%.h,$(wildcard *.$(SUFFIX)))CFILES = $(wildcard *.$(SUFFIX)).PHONY: clean proper all backup tags dist showdeps realclean install### Program ###$(BIN): $(OFILES)	$(LINKER) $(LDFLAGS) -o $@ $^ $(LIBPATH) $(LIBS)%.o: %.$(SUFFIX)	$(CC) $(CPPFLAGS) $(DEFINES) $(INCPATH) -c $^ -o $@tags:	-$(RM) $(TAGSFILE)	$(CTAGS) $(CFILES)showdeps:	$(CC) -MM $(CFILES)all install: $(BIN)	-strip $(BIN)	-$(MOVE) $(BIN) $(BINDIR)### Clean ###realclean proper: clean	-$(RM) $(BINDIR)/$(BIN) $(BIN)clean:	-$(RM) $(OFILES) $(DEBUGDIR)/* $(TAGSFILE)### Misc ###backup: proper	-$(RM) ../$(TITLE)-`date +'%d%m%y-%H%M'`$(TARSUFFIX)	$(TAR) ../$(TITLE)-`date +'%d%m%y-%H%M'`$(TARSUFFIX) *dist: proper	-$(RM) ../$(DISTNAME)$(TARSUFFIX)	$(TAR) ../$(DISTNAME)$(TARSUFFIX) *# eof() Makefile

⌨️ 快捷键说明

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