-
Notifications
You must be signed in to change notification settings - Fork 234
/
serial2xsbug.mak
98 lines (84 loc) · 2.4 KB
/
serial2xsbug.mak
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
#
# Copyright (c) 2016-2023 Moddable Tech, Inc.
#
# This file is part of the Moddable SDK Tools.
#
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The Moddable SDK Tools is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
#
#
!IFNDEF GOAL
GOAL = debug
!ENDIF
NAME = serial2xsbug
!IFNDEF BUILD_DIR
BUILD_DIR = $(MODDABLE)\build
!ENDIF
BIN_DIR = $(BUILD_DIR)\bin\win\$(GOAL)
SRC_DIR = $(MODDABLE)\tools\$(NAME)
TMP_DIR = $(BUILD_DIR)\tmp\win\$(GOAL)\$(NAME)
C_OPTIONS = \
/c \
/D _CONSOLE \
/D WIN32 \
/D _CRT_SECURE_NO_DEPRECATE \
-D mxWindows=1 \
/I$(SRC_DIR) \
/I$(TLS_DIR) \
/I$(TMP_DIR) \
/nologo \
/MP
!IF "$(GOAL)"=="debug"
C_OPTIONS = $(C_OPTIONS) \
/D _DEBUG \
/D mxDebug \
/Fp$(TMP_DIR_DBG)\ \
/Od \
/W3 \
/Z7
!ELSE
C_OPTIONS = $(C_OPTIONS) \
/D NDEBUG \
/Fp$(TMP_DIR_RLS)\ \
/O2 \
/W0
!ENDIF
LIBRARIES = ws2_32.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib user32.lib Setupapi.lib
LINK_OPTIONS = /incremental:no /nologo /subsystem:console
!IF "$(GOAL)"=="debug"
LINK_OPTIONS = $(LINK_OPTIONS) /debug
!ENDIF
OBJECTS = \
$(TMP_DIR)\serial2xsbug.obj \
$(TMP_DIR)\serial2xsbug_win.obj
build : $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)\$(NAME).exe
$(TMP_DIR) :
if not exist $(TMP_DIR)\$(NULL) mkdir $(TMP_DIR)
$(BIN_DIR) :
if not exist $(BIN_DIR)\$(NULL) mkdir $(BIN_DIR)
$(BIN_DIR)\$(NAME).exe : $(OBJECTS)
link \
$(LINK_OPTIONS) \
$(LIBRARIES) \
$(OBJECTS) \
/implib:$(TMP_DIR)\$(NAME).lib \
/out:$(BIN_DIR)\$(NAME).exe
$(OBJECTS) : $(SRC_DIR)\serial2xsbug.h
{$(SRC_DIR)\}.c{$(TMP_DIR)\}.obj::
cd $(TMP_DIR)
cl $< $(C_OPTIONS)
clean :
del /Q $(BUILD_DIR)\bin\win\debug\$(NAME).exe
del /Q $(BUILD_DIR)\bin\win\release\$(NAME).exe
del /Q $(BUILD_DIR)\tmp\win\debug\$(NAME)
del /Q $(BUILD_DIR)\tmp\win\release\$(NAME)