-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.vc
87 lines (65 loc) · 2.98 KB
/
Makefile.vc
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
# This is the makefile for the MS Visual C++ toolchain
# Note that wxWidgets directory is hard coded here.
# When building wxWidgets, inside config.vc set "SHARED = 1" and "BUILD = release"
CPP=cl /nologo
LINK=link /NOLOGO /verbose:lib
CPPFLAGS=/O2 /EHsc /Iportaudio\include /Iportaudio\src\common \
/Ic:\wxWidgets-2.8.10\include
!IF DEFINED(DEBUG)
LINK=$(LINK) /DEBUG
CPPFLAGS=$(CPPFLAGS) /MDd /Zi /Ic:\wxWidgets-2.8.10\lib\vc_lib\mswd
WXLIBS=/LIBPATH:c:\\wxWidgets-2.8.10\lib\vc_lib wxbase28d.lib wxmsw28d_core.lib wxmsw28d_adv.lib wxregexd.lib wxexpatd.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib
!ELSE
CPPFLAGS=$(CPPFLAGS) /MT /Ic:\wxWidgets-2.8.10\lib\vc_lib\msw
WXLIBS=/LIBPATH:c:\\wxWidgets-2.8.10\lib\vc_lib wxbase28.lib wxmsw28_core.lib wxmsw28_adv.lib wxregex.lib wxexpat.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib
!ENDIF
WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib wininet.lib PowrProf.lib
OBJS = audio.obj dsp.obj SysInterface.obj Config.obj Logger.obj
GUI_OBJS = \
gui\App.obj \
gui\Frame.obj \
gui\TaskBarIcon.obj \
gui\PlotPane.obj \
gui\SonarThread.obj \
gui\SonarEvent.obj \
gui\ConfigFrame.obj \
gui\CloseConfirmFrame.obj
BINS = sonar_tui.exe sonar_gui.exe
############################## PORTAUDIO #################################
PA_OBJS = \
portaudio\src\common\pa_allocation.obj \
portaudio\src\common\pa_converters.obj \
portaudio\src\common\pa_cpuload.obj \
portaudio\src\common\pa_dither.obj \
portaudio\src\common\pa_debugprint.obj \
portaudio\src\common\pa_front.obj \
portaudio\src\common\pa_process.obj \
portaudio\src\common\pa_skeleton.obj \
portaudio\src\common\pa_stream.obj \
portaudio\src\common\pa_trace.obj \
portaudio\src\hostapi\wmme\pa_win_wmme.obj \
portaudio\src\os\win\pa_win_hostapis.obj \
portaudio\src\os\win\pa_win_util.obj \
portaudio\src\os\win\pa_win_waveformat.obj \
#portaudio.lib: $(PA_OBJS)
# $(LINK) -lib $@ $**
PA_FLAGS=/DPA_NO_DS /DPA_NO_ASIO /DPA_NO_WDMKS
############################# LINKING ####################################
all: sonar_gui.exe
sonar_tui.exe: $(PA_OBJS) $(OBJS) sonar_tui.obj
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $** $(WINLIBS)
sonar_gui.exe: $(PA_OBJS) $(OBJS) $(GUI_OBJS)
$(LINK) /OUT:$@ /PDB:sonar_gui.pdb /SUBSYSTEM:WINDOWS \
$** $(WXLIBS) $(WINLIBS)
############################## COMPILING #################################
.cpp.obj:
$(CPP) $(CPPFLAGS) /DPLATFORM_WINDOWS /Fo$@ /c $<
.c.obj:
$(CPP) $(CPPFLAGS) $(PA_FLAGS) /DPLATFORM_WINDOWS /Fo$@ /c $<
############################# MISC #######################################
clean:
-del $(BINS) $(OBJS) $(GUI_OBJS) $(PA_OBJS)
############################ DEPENDENCIES #################################
audio.obj: audio.cpp audio.hpp
dsp.obj: dsp.cpp dsp.hpp audio.hpp
sonar.obj: sonar.cpp sonar.hpp audio.hpp dsp.hpp