|
|
1.1 ! root 1: # ! 2: ! 3: # Makefile for MiNT using the Pure CC ! 4: ! 5: # ! 6: ! 7: ! 8: ! 9: # if you're cross-compiling, define NATIVECC ! 10: ! 11: # to the host's C compiler, NATIVECFLAGS to ! 12: ! 13: # the appropriate flags for it, and NATIVELIBS ! 14: ! 15: # to appropriate libraries ! 16: ! 17: # NATIVECC = cc ! 18: ! 19: # NATIVECFLAGS = -g ! 20: ! 21: # NATIVELIBS = ! 22: ! 23: ! 24: ! 25: NATIVECC = gcc ! 26: ! 27: NATIVECFLAGS = -O ! 28: ! 29: NATIVELIBS = -liio ! 30: ! 31: ! 32: ! 33: # ! 34: ! 35: # depending on your version of bison/yacc, you may ! 36: ! 37: # need to change these names, e.g. to ! 38: ! 39: # YACC = yacc ! 40: ! 41: # YTABC = y.tab.c ! 42: ! 43: # YTABH = y.tab.h ! 44: ! 45: ! 46: ! 47: YACC = bison -d ! 48: ! 49: YTABC = asm,tab.c ! 50: ! 51: YTABH = asm,tab.h ! 52: ! 53: ! 54: ! 55: # here are defs for the cross compiler ! 56: ! 57: # MiNT must be compiled with 16 bit integers ! 58: ! 59: ! 60: ! 61: CC = cc -g ! 62: ! 63: AS = cc -Wa,-2 -Wa,-8 -Wa,-S -c ! 64: ! 65: #MODEL = -mshort -m68020 ! 66: ! 67: LIBS = -lpctoslib.lib ! 68: ! 69: ! 70: ! 71: # add -DEZMINT for smaller MiNT ! 72: ! 73: DEFS = -DFASTTEXT -DOWN_LIB ! 74: ! 75: ! 76: ! 77: # if you have an older version of gcc, it won't understand -G; ! 78: ! 79: # that won't hurt anything (it just controls the format of the ! 80: ! 81: # symbol table) so just delete the -G. Do *not* change it into ! 82: ! 83: # -g!!! ! 84: ! 85: # ! 86: ! 87: CFLAGS = -D__STDC__ -W0,-P $(MODEL) $(DEFS) ! 88: ! 89: ! 90: ! 91: ! 92: ! 93: COBJS = bios.o xbios.o console.o dos.o dosdir.o dosfile.o dosmem.o dossig.o \ ! 94: ! 95: filesys.o main.o mem.o proc.o signal.o timeout.o tty.o util.o \ ! 96: ! 97: biosfs.o pipefs.o procfs.o tosfs.o debug.o rendez.o \ ! 98: ! 99: unifs.o shmfs.o fasttext.o ! 100: ! 101: ! 102: ! 103: CSRCS = bios.c xbios.c console.c dos.c dosdir.c dosfile.c dosmem.c dossig.c \ ! 104: ! 105: filesys.c main.c mem.c proc.c signal.c timeout.c tty.c util.c \ ! 106: ! 107: biosfs.c pipefs.c procfs.c tosfs.c debug.c rendez.c \ ! 108: ! 109: unifs.c shmfs.c fasttext.c ! 110: ! 111: ! 112: ! 113: SOBJS = context.o intr.o syscall.o quickzer.o quickmov.o cpu.o ! 114: ! 115: ! 116: ! 117: OBJS = $(COBJS) $(SOBJS) ! 118: ! 119: ! 120: ! 121: mint.prg: $(OBJS) ! 122: ! 123: $(CC) $(CFLAGS) -o mint.prg $(OBJS) $(LIBS) ! 124: ! 125: ! 126: ! 127: $(SOBJS): proc.h ! 128: ! 129: $(COBJS): mint.h proc.h file.h ! 130: ! 131: ! 132: ! 133: main.o: version.h ! 134: ! 135: bios.o: inline.h ! 136: ! 137: ! 138: ! 139: # ! 140: ! 141: # assembler source files are now handled in a radically different ! 142: ! 143: # fashion. We build a pre-processor program, asmtrans, that ! 144: ! 145: # takes the .spp files, merges them with an include file that ! 146: ! 147: # gives various offsets into structures of interest, and produces ! 148: ! 149: # the .s files as output. This has two major advantages: ! 150: ! 151: # (1) it lets us use the same source for both the Lattice and ! 152: ! 153: # gcc assembler files (the translator will convert), and ! 154: ! 155: # (2) if we change the CONTEXT or PROC structures, we don't ! 156: ! 157: # have to dig through the source code looking for ! 158: ! 159: # magic numbers ! 160: ! 161: ! 162: ! 163: # the asm translator program ! 164: ! 165: # Note that this must be compiled with the native CC of whatever ! 166: ! 167: # system you're using; see the definitions at the top of this ! 168: ! 169: # file. ! 170: ! 171: ! 172: ! 173: ATRANSOBJ = asmtab.o trutil.o trans.o ! 174: ! 175: ATRANS = asmtrans.ttp ! 176: ! 177: ! 178: ! 179: $(ATRANS): $(ATRANSOBJ) ! 180: ! 181: $(NATIVECC) $(NATIVECFLAGS) -o $(ATRANS) $(ATRANSOBJ) \ ! 182: ! 183: $(NATIVELIBS) ! 184: ! 185: ! 186: ! 187: asmtab.o: asmtab.c asmtrans.h ! 188: ! 189: $(NATIVECC) $(NATIVECFLAGS) -o $@ -c $< ! 190: ! 191: ! 192: ! 193: trutil.o: trutil.c asmtrans.h ! 194: ! 195: $(NATIVECC) $(NATIVECFLAGS) -o $@ -c $< ! 196: ! 197: ! 198: ! 199: trans.o: trans.c asmtrans.h ! 200: ! 201: $(NATIVECC) $(NATIVECFLAGS) -o $@ -c $< ! 202: ! 203: ! 204: ! 205: ! 206: ! 207: asmtab.c asmtab.h: asm.y ! 208: ! 209: $(YACC) asm.y ! 210: ! 211: mv $(YTABC) asmtab.c ! 212: ! 213: mv $(YTABH) asmtab.h ! 214: ! 215: ! 216: ! 217: # the magic number include file is generated automagically ! 218: ! 219: # NOTE that of course, magic.i can only reliably be generated ! 220: ! 221: # on an Atari ST; if you're cross-compiling, you'll have ! 222: ! 223: # to edit magic.i by hand ! 224: ! 225: # for cross compilers; uncomment the following definitions ! 226: ! 227: # and comment out the other ones below ! 228: ! 229: ! 230: ! 231: # for cross-compiling ! 232: ! 233: ! 234: ! 235: # GENMAGICPRG=echo ! 236: ! 237: # magic.i: proc.h file.h genmagic.c ! 238: ! 239: # echo "Warning: magic.i may be out of date" ! 240: ! 241: ! 242: ! 243: #for native compiling ! 244: ! 245: ! 246: ! 247: GENMAGICPRG=genmagic.ttp ! 248: ! 249: ! 250: ! 251: $(GENMAGICPRG): genmagic.c proc.h file.h ! 252: ! 253: $(CC) $(CFLAGS) -DGENMAGIC -o $(GENMAGICPRG) genmagic.c ! 254: ! 255: ! 256: ! 257: magic.i: $(GENMAGICPRG) ! 258: ! 259: $(GENMAGICPRG) $@ ! 260: ! 261: ! 262: ! 263: # ! 264: ! 265: # assembler source files ! 266: ! 267: # ! 268: ! 269: .SUFFIXES: .spp ! 270: ! 271: ! 272: ! 273: .spp.s: ! 274: ! 275: $(ATRANS) -purec -o $@ $< ! 276: ! 277: ! 278: ! 279: context.o: context.spp magic.i $(ATRANS) ! 280: ! 281: intr.o: intr.spp magic.i $(ATRANS) ! 282: ! 283: syscall.o: syscall.spp magic.i $(ATRANS) ! 284: ! 285: quickzer.o: quickzer.spp $(ATRANS) ! 286: ! 287: quickmov.o: quickmov.spp $(ATRANS) ! 288: ! 289: cpu.o: cpu.spp $(ATRANS) ! 290: ! 291: ! 292: ! 293: # ! 294: ! 295: # mkptypes generates prototypes from C source code. If you don't have it, ! 296: ! 297: # you'll have to add/delete function prototypes by hand. ! 298: ! 299: # also: Sozobon users will have to edit proto.h by hand to change the ! 300: ! 301: # #if defined(__STDC__) || defined(__cplusplus) ! 302: ! 303: # line into ! 304: ! 305: # #if __STDC__ ! 306: ! 307: # ! 308: ! 309: proto.h: $(CSRCS) ! 310: ! 311: mkptypes $(CSRCS) >proto.h ! 312: ! 313: ! 314: ! 315: # ! 316: ! 317: # macros for cleaning up ! 318: ! 319: # ! 320: ! 321: GENFILES= $(OBJS) $(ATRANSOBJ) $(ATRANS) $(GENMAGICPRG) ! 322: ! 323: EXTRAS= asmtab.c asmtab.h mint.prg ! 324: ! 325: ! 326: ! 327: clean: ! 328: ! 329: $(RM) $(GENFILES) ! 330: ! 331: ! 332: ! 333: realclean: ! 334: ! 335: $(RM) $(GENFILES) $(EXTRAS) ! 336:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.