-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
51 lines (40 loc) · 992 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
TARGET = p6cache
BUILD = dos
SYSTEM = pmode
DEBUG = all
DLEVEL = 0
RASTER = 0
INCLUDE = coreboot
AS = nasm.exe
CC = wcc386.exe
CP = wpp386.exe
LD = wlink.exe
CFLAGS = -5r -fp5 -fpi87 -zp16 -onhasbmir -s -d$(DLEVEL) -bt=$(BUILD) -I=$(INCLUDE)
LFLAGS =
AFLAGS = -f win32 -l $<.lst
OBJS = $(TARGET).obj mycpuid.obj l2_cache.obj
OBJSTR = file {$(OBJS)}
LIBS =
LIBSTR = library {$(LIBS)}
all: $(TARGET).exe .symbolic
$(TARGET).exe : $(OBJS) .symbolic
%write $(TARGET).lnk debug $(DEBUG)
%write $(TARGET).lnk name $(TARGET)
%write $(TARGET).lnk option map=$(TARGET).map
# %write $(TARGET).lnk option eliminate
%write $(TARGET).lnk $(OBJSTR)
# %write $(TARGET).lnk $(LIBSTR)
%write $(TARGET).lnk system $(SYSTEM)
$(LD) @$(TARGET).lnk $(LFLAGS)
del $(TARGET).lnk
.c.obj:
$(CC) $< $(CFLAGS)
.cpp.obj:
$(CP) $< $(CFLAGS)
.asm.obj:
$(AS) $< $(AFLAGS)
# clean all
clean: .symbolic
del *.$(O)
del $(TARGET).exe
del *.err