Annotation of MiNT/src/makefile.lcc, revision 1.1.1.2

1.1       root        1: #
                      2: 
                      3: # Makefile for MiNT using the LCC
                      4: 
                      5: #
                      6: 
                      7: #for 16 bit integers ONLY
                      8: 
                      9: MODEL = -w -b0 -r0 -bn -aw
                     10: 
                     11: LIBS =
                     12: 
1.1.1.2 ! root       13: DEFS = -DFASTTEXT -DOWN_LIB
1.1       root       14: 
                     15: SYMS = -Hmint.sym
                     16: 
                     17: OPTS = -d1 -Oloop -v -cfs -cag
                     18: 
                     19: 
                     20: 
                     21: # 30   - pointers do not point to same type of object
                     22: 
                     23: # 86   - formal definitions conflict with type list
                     24: 
                     25: # 100  - no prototype declared for function
                     26: 
                     27: # 104  - conversion from pointer to const/volatile to pointer to non-const/volatile
                     28: 
                     29: # 135  - assignment to shorter data type (precision may be lost)
                     30: 
                     31: # 154  - no prototype declared for function pointer
                     32: 
1.1.1.2 ! root       33: # 159  - use of unary minus on unsigned value
1.1       root       34: 
1.1.1.2 ! root       35: ERRORS = -j30e86e100e104e135i154e159i
1.1       root       36: 
                     37: 
                     38: 
1.1.1.2 ! root       39: CC = lcc
1.1       root       40: 
1.1.1.2 ! root       41: COPTS = $(OPTS) $(MODEL) $(DEFS) $(ERRORS)
1.1       root       42: 
1.1.1.2 ! root       43: CFLAGS = $(COPTS) $(SYMS)
1.1       root       44: 
1.1.1.2 ! root       45: ASFLAGS = -ma -m8 -.
1.1       root       46: 
1.1.1.2 ! root       47: LDFLAGS = -t=
1.1       root       48: 
                     49: 
                     50: 
                     51: COBJS = main.o bios.o xbios.o console.o dos.o dosdir.o dosfile.o dosmem.o \
                     52: 
                     53:        dossig.o filesys.o mem.o proc.o signal.o timeout.o tty.o util.o \
                     54: 
                     55:        biosfs.o pipefs.o procfs.o tosfs.o debug.o rendez.o \
                     56: 
                     57:        unifs.o shmfs.o fasttext.o
                     58: 
                     59: 
                     60: 
                     61: CSRCS = main.c bios.c xbios.c console.c dos.c dosdir.c dosfile.c dosmem.c \
                     62: 
                     63:        dossig.c filesys.c mem.c proc.c signal.c timeout.c tty.c util.c \
                     64: 
                     65:        biosfs.c pipefs.c procfs.c tosfs.c debug.c rendez.c \
                     66: 
                     67:        unifs.c shmfs.c fasttext.c
                     68: 
                     69: 
                     70: 
1.1.1.2 ! root       71: SOBJS = context.o intr.o syscall.o quickzer.o quickmov.o cpu.o
        !            72: 
        !            73: SPPSRCS = context.spp intr.spp syscall.spp quickzer.spp quickmov.spp cpu.spp
        !            74: 
        !            75: SSRCS = context.s intr.s syscall.s quickzer.s quickmov.s cpu.s
1.1       root       76: 
                     77: 
                     78: 
                     79: OBJS = $(COBJS) $(SOBJS)
                     80: 
                     81: 
                     82: 
                     83: mint.prg: $(OBJS)
                     84: 
                     85:        $(CC) $(CFLAGS) -o mint.prg $(LDFLAGS) $(OBJS) $(LIBS)
                     86: 
                     87: 
                     88: 
                     89: $(COBJS): mint.sym
                     90: 
                     91: 
                     92: 
                     93: main.o: version.h
                     94: 
                     95: 
                     96: 
                     97: mint.sym: mint.h ctype.h assert.h atarierr.h basepage.h types.h \
                     98: 
1.1.1.2 ! root       99:        signal.h mem.h proc.h file.h sproto.h proto.h inline.h
        !           100: 
        !           101:        $(CC) $(COPTS) -ph -o mint.sym mint.h
        !           102: 
        !           103: 
        !           104: 
        !           105: #
        !           106: 
        !           107: # assembler source files are now handled in a radically different
        !           108: 
        !           109: # fashion. We build a pre-processor program, asmtrans, that
        !           110: 
        !           111: # takes the .spp files, merges them with an include file that
        !           112: 
        !           113: # gives various offsets into structures of interest, and produces
        !           114: 
        !           115: # the .s files as output. This has two major advantages:
1.1       root      116: 
1.1.1.2 ! root      117: # (1) it lets us use the same source for both the Lattice and
        !           118: 
        !           119: #     gcc assembler files (the translator will convert), and
        !           120: 
        !           121: # (2) if we change the CONTEXT or PROC structures, we don't
        !           122: 
        !           123: #     have to dig through the source code looking for
        !           124: 
        !           125: #     magic numbers
        !           126: 
        !           127: 
        !           128: 
        !           129: # the asm translator program
        !           130: 
        !           131: 
        !           132: 
        !           133: ATRANSOBJ = asmtab.o trutil.o trans.o
        !           134: 
        !           135: ATRANS = asmtrans.ttp
        !           136: 
        !           137: 
        !           138: 
        !           139: # to build $(ATRANS) we re-run the makefile, overriding SYMS (since the
        !           140: 
        !           141: # precompiled headers disagree with the Standard C library), ERRORS (since
        !           142: 
        !           143: # the bison parser is some of the dirtiest code ever), and OPTS (because
        !           144: 
        !           145: # alloca() and the optimiser are a no-no).
        !           146: 
        !           147: atrans:
        !           148: 
        !           149:        $(MAKE) -f makefile.lcc SYMS= ERRORS= OPTS= asmtrans.ttp
        !           150: 
        !           151: .PHONY:        atrans
        !           152: 
        !           153: 
        !           154: 
        !           155: $(ATRANS): $(ATRANSOBJ)
        !           156: 
        !           157:        $(CC) $(CFLAGS) -o $(ATRANS) $(ATRANSOBJ)
1.1       root      158: 
                    159: 
                    160: 
                    161: #
                    162: 
1.1.1.2 ! root      163: # depending on your version of bison/yacc, you may
        !           164: 
        !           165: # need to change these names
1.1       root      166: 
1.1.1.2 ! root      167: YACC = bison -d
        !           168: 
        !           169: YTABC = asm,tab.c
        !           170: 
        !           171: YTABH = asm,tab.h
        !           172: 
        !           173: 
        !           174: 
        !           175: asmtab.c asmtab.h:     asm.y
        !           176: 
        !           177:        $(YACC) asm.y
        !           178: 
        !           179:        mv $(YTABC) asmtab.c
        !           180: 
        !           181:        mv $(YTABH) asmtab.h
        !           182: 
        !           183: 
        !           184: 
        !           185: # the magic number include file is generated automagically
        !           186: 
        !           187: 
        !           188: 
        !           189: genmagic.ttp: genmagic.c mint.sym
        !           190: 
        !           191:        $(CC) $(CFLAGS) -DGENMAGIC -o genmagic.ttp genmagic.c
        !           192: 
        !           193: 
        !           194: 
        !           195: magic.i: genmagic.ttp
        !           196: 
        !           197:        genmagic magic.i
        !           198: 
        !           199: 
        !           200: 
        !           201: #
        !           202: 
        !           203: # assembler source files
1.1       root      204: 
                    205: #
                    206: 
1.1.1.2 ! root      207: .SUFFIXES: .spp
        !           208: 
1.1       root      209: 
                    210: 
1.1.1.2 ! root      211: .spp.o:
1.1       root      212: 
1.1.1.2 ! root      213:        $(ATRANS) -asm -o $*.s $<
1.1       root      214: 
1.1.1.2 ! root      215:        $(AS) $(ASFLAGS) -o$@ $*.s
1.1       root      216: 
1.1.1.2 ! root      217:        $(RM) $*.s
1.1       root      218: 
                    219: 
                    220: 
1.1.1.2 ! root      221: .spp.s:
1.1       root      222: 
1.1.1.2 ! root      223:        $(ATRANS) -asm -o $@ $<
1.1       root      224: 
                    225: 
                    226: 
1.1.1.2 ! root      227: context.spp intr.spp syscall.spp: magic.i
1.1       root      228: 
                    229: 
                    230: 
1.1.1.2 ! root      231: $(SPPSRCS): atrans
1.1       root      232: 
                    233: 
                    234: 
1.1.1.2 ! root      235: #
        !           236: 
        !           237: # A phony target to build the .S files for use by MINTLC.PRJ
        !           238: 
        !           239: #
1.1       root      240: 
1.1.1.2 ! root      241: ssrcs: $(SSRCS)
        !           242: 
        !           243: .PHONY:        ssrcs
1.1       root      244: 
                    245: 
                    246: 
                    247: #
                    248: 
                    249: # For building proto.h using Lattice we use the compiler option to
                    250: 
                    251: # generate them for external functions only. We also ask it to protect
                    252: 
                    253: # the prototypes with __PROTO; we could then sed __PROTO references into
                    254: 
                    255: # P_ ones (but don't at the moment).
                    256: 
                    257: #
                    258: 
1.1.1.2 ! root      259: # This is more trouble than its worth, lets forget it for know (lets be
        !           260: 
        !           261: # honest editting proto.h by hand is usually easier...)
        !           262: 
        !           263: #proto.h: $(CSRCS)
        !           264: 
        !           265: #      $(CC) -pep $(CFLAGS) $(CSRCS)
        !           266: 
        !           267: #      cat $(CSRCS:.c=.i) >proto.h
        !           268: 
        !           269: #      rm $(CSRCS:.c=.i)
        !           270: 
        !           271: 
        !           272: 
        !           273: #
        !           274: 
        !           275: # macros for cleaning up
        !           276: 
        !           277: #
        !           278: 
        !           279: GENFILES= $(OBJS) $(ATRANSOBJ) magic.i $(ATRANS) genmagic.ttp genmagic.o \
        !           280: 
        !           281:        mint.sym $(SSRCS)
        !           282: 
        !           283: EXTRAS= asmtab.c asmtab.h mint.prg
        !           284: 
        !           285: 
        !           286: 
        !           287: clean:
        !           288: 
        !           289:        $(RM) $(GENFILES)
        !           290: 
1.1       root      291: 
                    292: 
1.1.1.2 ! root      293: realclean:
1.1       root      294: 
1.1.1.2 ! root      295:        $(RM) $(GENFILES) $(EXTRAS)
1.1       root      296: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.