forked from ASPLes/nopoll
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile.win
94 lines (76 loc) · 3.15 KB
/
Makefile.win
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
# Hey emacs this this -*- makefile -*-
# Makefile.win: compile the af-arch enviroment under the mingw
# Advanced Software Prodution Line, S.L.
# include versions file
include versions.mk
include config.mk
# directory were libraries and tools will be installed
export INSTALL_DIR = c:/msys/1.0/home/acinom/nopoll/trunk/install
# general configuration
# export enable_gcc_debug = -g
# nopoll configuration (enable log: uncomment)
# export enable_nopoll_log =-DSHOW_DEBUG_LOG
# compilation mode to use: console, windows. If console is used the
# output to the console will be allowed. Other wise, if windows
# selected the console output will be disabled. On windows platforms
# is prefered the windows mode. For debuging I recomend to use
# console.
export MODE = windows
#############################################
# after this line lines shouldn't be edited #
#############################################
top_srcdir = ..
export search_lib_path =
# nopoll configuration
nopoll_lib = src
nopoll_test = test
export nopoll_dll = libnopoll
# strip command
strip = strip --strip-unneeded
build: all
all: prepare_versions_mk build_nopoll
prepare_nshs:
./prepare-nsh.sh $(platform_bits)
prepare_versions_mk: prepare_nshs
rm -f versions.mk
# af-arch version
echo -n "nopoll_version = " >> versions.mk
cat VERSION >> versions.mk
build_nopoll: prepare_versions_mk
@echo
@echo "Building libnopoll 1.0.."
@echo "Building libnopoll 1.0 (PRODUCTION RELEASE).."
test -d release || mkdir release
rm -rf release/libnopoll0
mkdir release/libnopoll0
cp src/nopoll_config_win$(platform_bits).h src/nopoll_config.h
@cd $(nopoll_lib); NOPOLL_VERSION=$(nopoll_version) release_dir=../release/libnopoll0 make -f Makefile.win; cd $(top_srcdir)
@cd $(nopoll_test); NOPOLL_VERSION=$(nopoll_version) make -f Makefile.win; cd $(top_srcdir)
build_debug_nopoll: prepare_versions_mk
@echo
@echo "Building libnopoll 1.0 (DEBUG SUPPORT).."
@echo "Using following gcc version.."
gcc --version
test -d debug || mkdir debug
rm -rf debug/libnopoll0
mkdir debug/libnopoll0
@cd $(nopoll_lib); enable_nopoll_log=-DSHOW_DEBUG_LOG NOPOLL_VERSION=$(nopoll_version) release_dir=../debug/libnopoll0 make -f Makefile.win; cd $(top_srcdir)
@cd $(nopoll_test); enable_nopoll_log=-DSHOW_DEBUG_LOG NOPOLL_VERSION=$(nopoll_version) make -f Makefile.win; cd $(top_srcdir)
nopoll_bundle_prepare: prepare_nshs
make -f Makefile.win clean_nopoll
make -f Makefile.win build_debug_nopoll
make -f Makefile.win clean_nopoll
make -f Makefile.win build_nopoll
# NOTE: you must first run:
# >> make -f Makefile.win nopoll_bundle_prepare
# and then
# >> make -f Makefile.win nopoll_bundle
# in order to run the create the installer
nopoll_bundle: prepare_nshs
@echo "generando fichero de instalación"
$(makensis) nopoll.nsi
clean_nopoll: prepare_versions_mk
@echo "CLEANING noPoll"
cd $(nopoll_lib); make -f Makefile.win clean; cd $(top_srcdir)
cd $(nopoll_test); make -f Makefile.win clean; cd $(top_srcdir)
clean: clean_nopoll