-
Notifications
You must be signed in to change notification settings - Fork 34
/
makefile.dos
141 lines (118 loc) · 3.58 KB
/
makefile.dos
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
TARGET := output/sbemu.exe
CC := gcc
CXX := gxx
ifeq ($(DEBUG),)
override DEBUG = 0
endif
DEBUG ?= 0
VERSION ?= LOCAL_DOS
RM := del
INCLUDES := -I./mpxplay -I./sbemu -I./drivers/include
DEFINES := -D__DOS__ -DSBEMU -DDEBUG=$(DEBUG) -DMAIN_SBEMU_VER=\"$(VERSION)\"
CFLAGS := -fcommon -march=i386 -Os $(INCLUDES) $(DEFINES)
LDFLAGS := -lstdcxx -lm
ifeq ($(DEBUG),0)
LDFLAGS += -s
CFLAGS += -DNDEBUG
endif
ifeq ($(V),1)
SILENTCMD :=
SILENTMSG := @echo > nul
else
SILENTCMD := @
SILENTMSG := @echo
endif
VPATH += .
VPATH += sbemu
VPATH += sbemu/dpmi
VPATH += sbemu/dpmi/djgpp
VPATH += mpxplay/au_cards
all: $(TARGET)
CARDS_SRC := mpxplay/au_cards/ac97_def.c \
mpxplay/au_cards/au_base.c \
mpxplay/au_cards/au_cards.c \
mpxplay/au_cards/au_linux.c \
mpxplay/au_cards/dmairq.c \
mpxplay/au_cards/pcibios.c \
mpxplay/au_cards/ioport.c \
mpxplay/au_cards/sc_e1371.c \
mpxplay/au_cards/sc_ich.c \
mpxplay/au_cards/sc_cmi.c \
mpxplay/au_cards/sc_inthd.c \
mpxplay/au_cards/sc_sbl24.c \
mpxplay/au_cards/sc_sbliv.c \
mpxplay/au_cards/sc_via82.c \
mpxplay/au_cards/sc_null.c \
mpxplay/au_cards/sc_ymf.c \
CTXFI_SRC := drivers/ctxfi/ctsrc.c \
drivers/ctxfi/ctresource.c \
drivers/ctxfi/ctmixer.c \
drivers/ctxfi/ctimap.c \
drivers/ctxfi/ctamixer.c \
drivers/ctxfi/ctatc.c \
drivers/ctxfi/cttimer.c \
drivers/ctxfi/ctdaio.c \
drivers/ctxfi/ctpcm.c \
drivers/ctxfi/cthardware.c \
drivers/ctxfi/ctvmem.c \
drivers/ctxfi/cthw20k1.c \
drivers/ctxfi/cthw20k2.c \
mpxplay/au_cards/sc_ctxfi.c \
EMU10K1_SRC := drivers/emu10k1/emu10k1x.c \
mpxplay/au_cards/sc_emu10k1x.c \
TRIDENT_SRC := drivers/trident/trident_main.c \
drivers/trident/trident_memory.c \
mpxplay/au_cards/sc_trident.c \
ALS4000_SRC := drivers/als4000/als4000.c \
drivers/als4000/sb_common.c \
drivers/als4000/sb_mixer.c \
mpxplay/au_cards/sc_als4000.c \
OXYGEN_SRC := drivers/oxygen/xonar_dg.c \
drivers/oxygen/xonar_dg_mixer.c \
drivers/oxygen/xonar_lib.c \
drivers/oxygen/oxygen.c \
drivers/oxygen/oxygen_io.c \
drivers/oxygen/oxygen_lib.c \
drivers/oxygen/oxygen_pcm.c \
drivers/oxygen/oxygen_mixer.c \
mpxplay/au_cards/sc_oxygen.c \
ALLEGRO_SRC := drivers/maestro3/maestro3.c \
mpxplay/au_cards/sc_allegro.c \
SBEMU_SRC := sbemu/dbopl.cpp \
sbemu/opl3emu.cpp \
sbemu/pic.c \
sbemu/sbemu.c \
sbemu/untrapio.c \
sbemu/vdma.c \
sbemu/virq.c \
sbemu/serial.c \
sbemu/dpmi/xms.c \
sbemu/dpmi/dpmi.c \
sbemu/dpmi/dbgutil.c \
sbemu/dpmi/dpmi_dj2.c \
sbemu/dpmi/dpmi_tsr.c \
sbemu/dpmi/djgpp/gormcb.c \
sbemu/dpmi/djgpp/gopint.c \
main.c \
qemm.c \
utility.c \
hdpmipt.c \
irqguard.c \
LINUX_DRIVERS_SRC := $(CTXFI_SRC) $(EMU10K1_SRC) $(TRIDENT_SRC) $(ALS4000_SRC) $(OXYGEN_SRC) $(ALLEGRO_SRC)
SRC := $(LINUX_DRIVERS_SRC) $(CARDS_SRC) $(SBEMU_SRC)
OBJS := $(patsubst %.cpp,output/%.o,$(patsubst %.c,output/%.o,$(SRC)))
$(TARGET): $(OBJS)
$(SILENTMSG) LINK $@
$(SILENTCMD)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
output/%.o: %.c
$(SILENTMSG) CC $@
$(SILENTCMD)$(CC) $(CFLAGS) -c $< -o $@
output/%.o: %.cpp
$(SILENTCMD)$(SILENTMSG) CXX $@
$(SILENTCMD)$(CXX) $(CFLAGS) -c $< -o $@
clean:
$(SILENTMSG) CLEAN
$(SILENTCMD)$(RM) output\*.o
distclean: clean
$(SILENTMSG) DISTCLEAN
$(SILENTCMD)$(RM) $(TARGET)