-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.mingw
64 lines (55 loc) · 1.24 KB
/
Makefile.mingw
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
#
# Makefile.mingw
#
include ./nanopb/extra/nanopb.mk
CC ?= gcc
C_FLAGS = -Wall -Werror -g -O0 -static-libgcc -lm -std=c99
# PIDGIN_TREE_TOP := ../pidgin-release-2.x.y
PIDGIN_TREE_TOP ?= ../pidgin-v2.14.13
GTK_TOP ?= ../win32-dev/gtk_2_0-2.14
PURPLE_TOP ?= $(PIDGIN_TREE_TOP)/libpurple
##
## INCLUDE PATHS
##
INCLUDE_PATHS += \
-I. \
-I$(GTK_TOP)/include \
-I$(GTK_TOP)/include/glib-2.0 \
-I$(GTK_TOP)/lib/glib-2.0/include \
-I$(PURPLE_TOP) \
-I$(PURPLE_TOP)/win32 \
-I$(PIDGIN_TREE_TOP) \
-I$(NANOPB_DIR)
LIB_PATHS += \
-L$(GTK_TOP)/lib \
-L$(PURPLE_TOP)
##
## SOURCES, OBJECTS
##
C_SRC = \
meshtastic/mesh.pb.c \
meshtastic/telemetry.pb.c \
meshtastic/config.pb.c \
meshtastic/channel.pb.c \
meshtastic/xmodem.pb.c \
meshtastic/device_ui.pb.c \
meshtastic/module_config.pb.c \
meshtastic/admin.pb.c \
meshtastic/connection_status.pb.c \
$(NANOPB_DIR)/pb_encode.c \
$(NANOPB_DIR)/pb_decode.c \
$(NANOPB_DIR)/pb_common.c \
mtstrings.c \
meshtastic.c
##
## LIBRARIES
##
LIBS = \
-lglib-2.0 \
-lintl \
-lws2_32 \
-lpurple
libmeshtastic.dll: $(C_SRC)
$(CC) $(C_FLAGS) $(C_SRC) $(LIB_PATHS) $(LIBS) $(INCLUDE_PATHS) -olibmeshtastic.dll -shared
clean:
rm -f libmeshtastic.dll