| 1 | # $Id: mini.mak,v 1.1.2.9 2001-08-20 19:11:36 bird Exp $
|
|---|
| 2 |
|
|---|
| 3 | #
|
|---|
| 4 | # Odin32 API
|
|---|
| 5 | #
|
|---|
| 6 | # kRx.exe makefile
|
|---|
| 7 | #
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | #
|
|---|
| 11 | # Tell the buildenvironment to make an VIO exe.
|
|---|
| 12 | #
|
|---|
| 13 | VIO = 0
|
|---|
| 14 | EXETARGET=1
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | #
|
|---|
| 18 | # Compiler, tools, and interference rules.
|
|---|
| 19 | #
|
|---|
| 20 | !include ..\..\..\makefile.inc
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | #
|
|---|
| 24 | # Tools and Flags Addjustments.
|
|---|
| 25 | #
|
|---|
| 26 | LD2FLAGS = $(LD2FLAGS) /BASE:0x10000 /Stack:0x1000
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | #
|
|---|
| 30 | # Interference rule. Note: ALP specific; enables listing.
|
|---|
| 31 | # (For Debug)
|
|---|
| 32 | #
|
|---|
| 33 | .asm{$(OBJDIR)}.obj:
|
|---|
| 34 | !ifdef NORMAL
|
|---|
| 35 | $(AS) $(ASFLAGS) -D:NORMAL=1 $< -Fo:$@ -Fl:$(OBJDIR)\$(*B).lst \
|
|---|
| 36 | !else
|
|---|
| 37 | $(AS) $(ASFLAGS) $< -Fo:$@ -Fl:$(OBJDIR)\$(*B).lst
|
|---|
| 38 | # masm $<, $@,$(OBJDIR)\$(*B).lst,$(OBJDIR)\$(*B).crf;
|
|---|
| 39 |
|
|---|
| 40 | !endif
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | #
|
|---|
| 45 | # Object files. Prefix with OBJDIR and one space before the '\'.
|
|---|
| 46 | #
|
|---|
| 47 | OBJS = \
|
|---|
| 48 | $(OBJDIR)\mini.obj
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 | #
|
|---|
| 52 | # Libraries. One space before the '\'.
|
|---|
| 53 | #
|
|---|
| 54 | LIBS = \
|
|---|
| 55 | os2386.lib
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 | #
|
|---|
| 59 | # Target name - name of the exe without extention and path.
|
|---|
| 60 | #
|
|---|
| 61 | !ifdef NORMAL
|
|---|
| 62 | TARGET = minic
|
|---|
| 63 | !else
|
|---|
| 64 | TARGET = minio
|
|---|
| 65 | !endif
|
|---|
| 66 | DEFFILE = mini.def
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | !ifdef NORMAL
|
|---|
| 71 | #
|
|---|
| 72 | # Main rule for the high octane category.
|
|---|
| 73 | #
|
|---|
| 74 | !if 1
|
|---|
| 75 | $(OBJDIR)\$(TARGET).exe: $(OBJS) $(DEFFILE) $(OBJDIR)\$(TARGET).lrf
|
|---|
| 76 | !ifdef WATCOM # 274 bytes
|
|---|
| 77 | wlink system os2v2 file {$(OBJS)} name $(OBJDIR)\.exe \
|
|---|
| 78 | import vprintf LIBCN.150 \
|
|---|
| 79 | # import DosPutMessage MSG.5 \
|
|---|
| 80 | option offset=0x0000 option alignment=1 option stack=4060
|
|---|
| 81 | # skip this step if it aint allowed, but then LXLITE has to get $(OBJDIR)\.exe as input. :-)
|
|---|
| 82 | mv $(OBJDIR)\.exe $@
|
|---|
| 83 | !else
|
|---|
| 84 | !if 0
|
|---|
| 85 | link386 /ALIGNMENT:1 /NONULLSDOSSEG /NOSECTORALIGNCODE /BASE:0x10000 /PACKCODE /PACKDATA \
|
|---|
| 86 | $(OBJS), $(OBJDIR)\$(TARGET).exe, $(OBJDIR)\$(TARGET).map, os2386.lib, mini.def;
|
|---|
| 87 | !else
|
|---|
| 88 | !ifndef VAC36 # 273 bytes
|
|---|
| 89 | -12 ilink /NOFREE /FORCE /ALIGNMENT:1 /Map /BASE:0x10000 /PACKCODE /PACKDATA /NOEXEPACK \
|
|---|
| 90 | $(OBJS), $(OBJDIR)\$(TARGET).exe, $(OBJDIR)\$(TARGET).map, os2386.lib, mini.def;
|
|---|
| 91 | !else
|
|---|
| 92 | -12 ilink /FORCE /ALIGNFILE:1 /Map /BASE:0x10000 /FIXED /PACKCODE /PACKDATA /NOEXEPACK /STACK:4060 \
|
|---|
| 93 | $(OBJS) /OUT:$(OBJDIR)\$(TARGET).exe /MAP:$(OBJDIR)\$(TARGET).map mini.def \
|
|---|
| 94 | /section:CODE32,RW
|
|---|
| 95 | !endif
|
|---|
| 96 | exehdr /RESETERROR $@
|
|---|
| 97 | !endif
|
|---|
| 98 | !endif
|
|---|
| 99 | $(LXLITE) /MR1 /AN:1 /ZS:1024 /ZX:1024 /MF3 /YXD /YND $@
|
|---|
| 100 | !else
|
|---|
| 101 | $(OBJDIR)\$(TARGET).exe: $(OBJS) $(DEFFILE) $(OBJDIR)\$(TARGET).lrf
|
|---|
| 102 | -8 ilink /NOFREE /FORCE /ALIGNMENT:1 /Map /BASE:0x10000 \
|
|---|
| 103 | /PACKCODE /PACKDATA /EXEPACK:1 /STACK:4000 \
|
|---|
| 104 | $(OBJS), $(OBJDIR)\$(TARGET).exe, $(OBJDIR)\$(TARGET).map, os2386.lib libcmi.lib, mini.def;
|
|---|
| 105 | $(LXLITE) /AN:1 /ZS:1024 /ZX:1024 /MF3 /YXD /YND $@
|
|---|
| 106 | !endif
|
|---|
| 107 |
|
|---|
| 108 | !else
|
|---|
| 109 |
|
|---|
| 110 | #
|
|---|
| 111 | # Builds the custom 196 bytes mini.exe.
|
|---|
| 112 | #
|
|---|
| 113 | $(OBJDIR)\$(TARGET).exe: $(OBJS) $(DEFFILE) myexe2bin.exe
|
|---|
| 114 | link $(OBJS), $(OBJDIR)\$(TARGET)ne.exe, $(OBJDIR)\$(TARGET).map;
|
|---|
| 115 | myexe2bin $(OBJDIR)\$(TARGET)ne.exe $@ 512
|
|---|
| 116 |
|
|---|
| 117 | # help tool, custom exe2bin.
|
|---|
| 118 | myexe2bin.exe myexe2bin: myexe2bin.c
|
|---|
| 119 | !ifndef WATCOM
|
|---|
| 120 | icc myexe2bin.c
|
|---|
| 121 | !else
|
|---|
| 122 | wcl386 myexe2bin.c
|
|---|
| 123 | !endif
|
|---|
| 124 | !endif
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 | #
|
|---|
| 128 | # Exe: Linker file - creates the parameter file passed on to the linker.
|
|---|
| 129 | #
|
|---|
| 130 | $(OBJDIR)\$(TARGET).lrf: makefile
|
|---|
| 131 | @echo Creating file <<$@
|
|---|
| 132 | /OUT:$(OBJDIR)\$(TARGET).exe
|
|---|
| 133 | /MAP:$(OBJDIR)\$(TARGET).map
|
|---|
| 134 | $(OBJS: =^
|
|---|
| 135 | )
|
|---|
| 136 | $(LIBS: =^
|
|---|
| 137 | )
|
|---|
| 138 | $(DEFFILE)
|
|---|
| 139 | <<keep
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|