-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jmakefile
61 lines (50 loc) · 1.33 KB
/
Jmakefile
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
# Determine if this is getting built by mingw
MINGW := $(shell if $(CC) -dumpmachine | grep -q mingw; then echo yes; else echo no; fi)
baseDir := $(HOWCO_BASEDIR)/src
libsDir := $(baseDir)/lib
projectName := ez
versions := debug release valgrind
#cc_exe := tsj
libraries := ez
#install_dir := $(HOME)/bin
########################################
# Set up sources & libraries here. #
########################################
ifeq ($(library), ez)
src := \
ez_libanl.c \
ez_libc.c \
ez_libdb.c \
ez_libpthread.c \
ez_libz.c \
# libs := oopinc ez m z
local_cppflags := -I ../liboopinc -I.
endif
# MINGW specific stuff
ifeq ($(MINGW), yes)
local_cppflags += -D_WIN32_WINNT=0x0600
endif
local_codeflags += \
-Wreturn-type \
-Wformat \
-Wchar-subscripts \
-Wparentheses -Wcast-qual \
-Wmissing-declarations \
########################################
# Set up custom compile flags here. #
########################################
ifeq ($(version),debug)
local_cppflags += -D_DEBUG -DDEBUG
local_codeflags += -g2 -O0
local_ldflags += -L$(libsDir)/$(version)
endif
ifeq ($(version),release)
local_cppflags += -DNDEBUG
local_codeflags += -g0 -O3
local_ldflags += -L$(libsDir)/$(version)
endif
ifeq ($(version),valgrind)
local_cppflags += -DNDEBUG
local_codeflags += -g2 -O0
local_ldflags += -L$(libsDir)/$(version)
endif