📄 makefile
字号:
################################################################## "make [all]" all exe's ## "make prog.o" compile only prog.o ## "make prog" compile only prog ## "make clean" remove junk caused by makes ## "make cleaner" remove all caused by makes ## "make uninstall" remove all caused by makes (incl. inst) ## "make install" installs executables in INSTALL_DIR ## ##%// Andy Hooper 08-May_2006 ##################################################################### X11 librariesXLIBS = -L/usr/X11R6/lib -lXm -lXt -lX11XINCS = -I/usr/X11R6/include### The shell we're using ###SHELL = /bin/sh### Install directory INSTALL_DIR = ../bin### compilerCC = g++### Compilation flagsCFLAGS = -O3##################################################################### THERE SHOULD BE NOTHING YOU WANT TO CHANGE BELOW THIS LINE ######################################################################## The programs we wantPROGS = calamp \ selpsc_patch \ selsbc_patch \ cpxsum \ pscphase \ psclonlat \ pscdem \ dismph# usedin install:SCRIPTS = ### Compilationdefault: allall: $(PROGS) dummy# dummy, since else makefile want to recompile the last util.dummy:# the utilities.selpsc_patch: selpsc_patch.o $(CC) $(CFLAGS) $@.o -o $@selsbc_patch: selsbc_patch.o $(CC) $(CFLAGS) $@.o -o $@calamp: calamp.o $(CC) $(CFLAGS) $@.o -o $@cpxsum: cpxsum.o $(CC) $(CFLAGS) $@.o -o $@pscphase: pscphase.o $(CC) $(CFLAGS) $@.o -o $@psclonlat: psclonlat.o $(CC) $(CFLAGS) $@.o -o $@pscdem: pscdem.o $(CC) $(CFLAGS) $@.o -o $@dismph: dismph.o XInfo.o CDisp.o CGetData.o CDispComp.o bytescale.o $(CC) $(CFLAGS) $? -o $@ ${XLIBS}.cpp.o: ${CC} -c ${XINCS} $*.cpp### Install in INSTALL_DIR by linking/copying executables ###install: $(PROGS) $(MAKE) definstall; ### Use symbolic links at our system, copy to /usr/local/bin on other.definstall: $(PROGS) dir=$(INSTALL_DIR); \ if test ! -d $$dir; then \ echo "Sorry, dir $(INSTALL_DIR) does not exist, exiting..."; exit; fi; \ echo Installing in directory: $$dir; \ list='$(PROGS) $(SCRIPTS)'; for p in $$list; do \ echo "Installing (copy): $$p"; \ cp -f $$p $(INSTALL_DIR)/$$p; \ done $(MAKE) cleaner### Helpers ###clean: @rm -f *.o *dummy* *.bak @echo "* Removed junk."### some reason under cygwin progs are not removed without ".exe"???CYGWIN_EXE = $(PROGS:=.exe)cleaner: clean @rm -f $(PROGS) $(CYGWIN_EXE) a.out @echo "* Removed executables in source dir: `pwd`."uninstall: cleaner dir=$(INSTALL_DIR); \ if test -d $$dir; then \ cd $(INSTALL_DIR); rm -f $(PROGS) $(CYGWIN_EXE); \ echo "* Removed executables in install dir: $(INSTALL_DIR)."; fi;### How to make object files ###.cc.o: $(CC) $(CFLAGS) -c -o $(@) $<### EOF.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -