|
|
1.1 ! root 1: ## ! 2: ## NeXT C Compiler Makefile. ! 3: ## ! 4: ## Ask Kresten if you have any torubles / questions. ! 5: ## ! 6: ! 7: # ! 8: # ** MANUAL BUILDS ** ! 9: # ! 10: # Use: ! 11: # make debug TARGETS='i386 m68k ...' ! 12: # ! 13: # from this directory to do manual builds. The build compiler(s) will ! 14: # appear in ./obj/cc-<target>-on-<host>/ subdirectories of here. Use ! 15: # "./xgcc -B./" in there to run the specific compiler. You can also ! 16: # just cd to a specific ./obj subdirectory and type "make <foo>" to build ! 17: # a specific program, like "cpp" or "cc1objplus". ! 18: # ! 19: # The makefile will automatically make a clone of the latest binaries ! 20: # the first time "make debug" is run. The binaries are kept outside ! 21: # of the revision control system. ! 22: ! 23: # ! 24: # ** AUTOMATIC BUILDS ** ! 25: # ! 26: # Automatic builds strictly follow the RC makefile API standards. However, ! 27: # in order to do a full build, a bootstrap is needed. To do this, simply ! 28: # do "make bootstrap" on the build machine, and install the resulting ! 29: # symbols in the BuildRoot. Then, do an ordinary "make install". ! 30: # ! 31: ! 32: TARGETS= m68k i386 hppa sparc ! 33: HOSTS= `arch` ! 34: ! 35: RC_ARCHS= $(HOSTS) ! 36: ! 37: SRCROOT=. ! 38: ! 39: SRC= `cd $(SRCROOT); pwd | sed s,/private,,` ! 40: DSTROOT= $(SRC)/dst ! 41: SYMROOT= $(SRC)/sym ! 42: OBJROOT= $(SRC)/obj ! 43: ! 44: ## ! 45: ## build compilers for targets=$(TARGETS), and hosts=$(RC_ARCHS). ! 46: ## bootstrap target must have been run before this. ! 47: ## ! 48: debug: obj.clone ! 49: ./build_gcc --thins \ ! 50: --srcroot=$(SRC) \ ! 51: --dstroot=$(DSTROOT) \ ! 52: --objroot=$(OBJROOT) \ ! 53: --symroot=$(SYMROOT) \ ! 54: --cflags="$(RC_CFLAGS) -g" \ ! 55: --hosts="$(RC_ARCHS)" \ ! 56: --targets="$(TARGETS)" ! 57: ! 58: obj.clone: ! 59: @root=$(OBJROOT); \ ! 60: if ls -lgd $$root | egrep '^l'; then \ ! 61: echo "============================================"; \ ! 62: echo "== CLONING BINARIES, WILL TAKE A WHILE... =="; \ ! 63: echo "============================================"; \ ! 64: mv $$root $$root.lnk; \ ! 65: mkdir $$root; cd $$root.lnk; \ ! 66: find . -depth -print | cpio -pdl $$root; \ ! 67: fi; \ ! 68: touch obj.clone ! 69: ! 70: obj.unclone: ! 71: root=$(OBJROOT); \ ! 72: if ls -lgd $$root.lnk | egrep '^l'; then \ ! 73: echo "============================================"; \ ! 74: echo "== REMOVING BINARIES, WILL TAKE A WHILE =="; \ ! 75: echo "============================================"; \ ! 76: mv $$root $$root.tree; \ ! 77: mv $$root.lnk $$root; \ ! 78: /bin/rm -Rf $$root.tree; \ ! 79: fi; \ ! 80: /bin/rm -f obj.clone ! 81: ! 82: config: ! 83: ./build_gcc --configure \ ! 84: --srcroot=$(SRC) \ ! 85: --dstroot=$(DSTROOT) \ ! 86: --objroot=$(OBJROOT) \ ! 87: --symroot=$(SYMROOT) \ ! 88: --cflags="$(RC_CFLAGS) -g" \ ! 89: --hosts="$(RC_ARCHS)" \ ! 90: --targets="$(TARGETS)" ! 91: ! 92: build: build_bison build_c++filt ! 93: ./build_gcc --thins \ ! 94: --srcroot=$(SRC) \ ! 95: --dstroot=$(DSTROOT) \ ! 96: --objroot=$(OBJROOT) \ ! 97: --symroot=$(SYMROOT) \ ! 98: --cflags="$(RC_CFLAGS) -g" \ ! 99: --hosts="$(RC_ARCHS)" \ ! 100: --targets="$(TARGETS)" ! 101: ! 102: install: build install_bison install_c++filt ! 103: ./build_gcc --fats \ ! 104: --srcroot=$(SRC) \ ! 105: --dstroot=$(DSTROOT) \ ! 106: --objroot=$(OBJROOT) \ ! 107: --symroot=$(SYMROOT) \ ! 108: --cflags="$(RC_CFLAGS)" \ ! 109: --hosts="$(RC_ARCHS)" \ ! 110: --targets="$(TARGETS)" ! 111: make installGNUsrc SRCROOT=$(DSTROOT)/NextDeveloper/Source/GNU ! 112: mkdirs $(DSTROOT)/usr/local/RelNotes ! 113: install -m 555 cc++ $(DSTROOT)/bin ! 114: install -m 555 ld++ $(DSTROOT)/bin ! 115: install -m 444 Compiler.rtf $(DSTROOT)/usr/local/RelNotes ! 116: install -m 444 CompilerPrivate.rtf $(DSTROOT)/usr/local/RelNotes ! 117: ! 118: ## ! 119: ## build compilers for target=$(RC_ARCHS), and host=`arch` ! 120: ## ! 121: bootstrap: build_bison ! 122: ./build_gcc --fats \ ! 123: --srcroot=$(SRC) \ ! 124: --dstroot=$(DSTROOT) \ ! 125: --objroot=$(OBJROOT) \ ! 126: --symroot=$(SYMROOT) \ ! 127: --cflags="$(RC_CFLAGS)" \ ! 128: --hosts=`arch` \ ! 129: --targets="$(RC_ARCHS)" ! 130: ! 131: clean: clean_bison ! 132: ./build_gcc --clean \ ! 133: --srcroot=$(SRC) \ ! 134: --dstroot=$(DSTROOT) \ ! 135: --objroot=$(OBJROOT) \ ! 136: --symroot=$(SYMROOT) \ ! 137: --cflags="$(RC_CFLAGS)" \ ! 138: --hosts="$(RC_ARCHS)" \ ! 139: --targets="$(TARGETS)" ! 140: ! 141: ! 142: installsrc: SRCROOT ! 143: mkdirs $(SRCROOT)/cc ! 144: if [ $(SRCROOT) != . ]; then \ ! 145: tar cBf - `ls -1 | egrep -v '^(obj|dst|sym)$'` \ ! 146: | (cd $(SRCROOT); tar xvf -); \ ! 147: fi ! 148: ! 149: installGNUsrc: SRCROOT ! 150: mkdirs $(SRCROOT)/cc ! 151: if [ $(SRCROOT) != . ]; then \ ! 152: tar cBf - `ls -1 | egrep -v '^(obj|dst|sym|SGS)$'` \ ! 153: | (cd $(SRCROOT); tar xvf -); \ ! 154: chown -R root.wheel $(SRCROOT); \ ! 155: fi ! 156: ! 157: installhdrs: DSTROOT ! 158: ! 159: ! 160: DSTROOT: ! 161: mkdirs $(DSTROOT) ! 162: ! 163: ! 164: SRCROOT: ! 165: @if [ -n "${$@}" ]; \ ! 166: then \ ! 167: exit 0; \ ! 168: else \ ! 169: echo Must define $@; \ ! 170: exit 1; \ ! 171: fi ! 172: ! 173: build_c++filt: ! 174: (cd $(SRCROOT)/c++filt; \ ! 175: $(MAKE) build \ ! 176: SYMROOT="$(SYMROOT)" \ ! 177: SRCROOT="$(SRCROOT)" ) ! 178: ! 179: install_c++filt: ! 180: (cd $(SRCROOT)/c++filt; \ ! 181: $(MAKE) install \ ! 182: SYMROOT="$(SYMROOT)" \ ! 183: DSTROOT="$(DSTROOT)" \ ! 184: SRCROOT="$(SRCROOT)" ) ! 185: ! 186: build_bison: $(OBJROOT)/bison_`arch`_obj/Makefile ! 187: (cd $(OBJROOT)/bison_`arch`_obj; \ ! 188: make CFLAGS="${RC_CFLAGS}" \ ! 189: LDFLAGS="${RC_CFLAGS}" ) ! 190: ! 191: $(OBJROOT)/bison_`arch`_obj: ! 192: mkdirs $(OBJROOT)/bison_`arch`_obj ! 193: ! 194: $(OBJROOT)/bison_`arch`_obj/Makefile: $(OBJROOT)/bison_`arch`_obj ! 195: (cd $(OBJROOT)/bison_`arch`_obj; $(SRCROOT)/bison/configure) ! 196: ! 197: install_bison: build_bison ! 198: mkdirs $(DSTROOT)/usr/local ! 199: (cd $(OBJROOT)/bison_`arch`_obj; \ ! 200: $(MAKE) install \ ! 201: CFLAGS="${RC_CFLAGS}" \ ! 202: LDFLAGS="${RC_CFLAGS}" \ ! 203: prefix="$(DSTROOT)/usr/local") ! 204: ! 205: clean_bison: ! 206: -(cd $(OBJROOT)/obj.bison; $(MAKE) clean) ! 207:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.