]> err.no Git - sope/blob - sope-appserver/NGObjWeb/GNUmakefile.preamble
fixed some NGMail framework build issue
[sope] / sope-appserver / NGObjWeb / GNUmakefile.preamble
1 # compilation settings
2
3 ifeq ($(frameworks),yes)
4 ADDITIONAL_CPPFLAGS += -DCOMPILE_AS_FRAMEWORK=1
5 endif
6
7 SOPE_ROOT=../..
8
9 ADDITIONAL_CPPFLAGS += \
10         -Wall -DCOMPILE_FOR_GSTEP_MAKE=1        \
11         -DSOPE_MAJOR_VERSION=$(MAJOR_VERSION)   \
12         -DSOPE_MINOR_VERSION=$(MINOR_VERSION)   \
13         -DSOPE_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
14
15 ADDITIONAL_CPPFLAGS  += -pipe -DCOMPILING_NGOBJWEB=1
16 libNGObjWeb_OBJCFLAGS += -Wall -Wno-import -Wno-protocol
17
18 SOPE_ROOT=../..
19 CORE_ROOT=$(SOPE_ROOT)/sope-core
20
21 ADDITIONAL_INCLUDE_DIRS += \
22         -I.                     \
23         -I./DynamicElements/    \
24         -I./Templates/          \
25         -I..                    \
26         -I$(CORE_ROOT)          \
27         -I$(CORE_ROOT)/NGStreams/       \
28         -I$(CORE_ROOT)/NGExtensions     \
29         -I$(SOPE_ROOT)/sope-mime
30
31
32 # library/framework search pathes
33
34 DEP_DIRS = \
35         $(SOPE_ROOT)/sope-mime/NGMail           \
36         $(SOPE_ROOT)/sope-mime                  \
37         $(SOPE_ROOT)/sope-core/NGStreams        \
38         $(SOPE_ROOT)/sope-core/NGExtensions     \
39         $(SOPE_ROOT)/sope-core/EOControl        \
40         $(SOPE_ROOT)/sope-xml/DOM               \
41         $(SOPE_ROOT)/sope-xml/XmlRpc            \
42         $(SOPE_ROOT)/sope-xml/SaxObjC
43
44 ifneq ($(frameworks),yes)
45 ADDITIONAL_LIB_DIRS += \
46         $(foreach dir,$(DEP_DIRS),\
47           -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
48 else
49 ADDITIONAL_LIB_DIRS += \
50         $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
51 endif
52
53 SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
54
55
56 # dependencies
57
58 ifneq ($(frameworks),yes)
59 sope-xml-libs  = -lXmlRpc -lDOM -lSaxObjC
60 sope-core-libs = -lNGStreams -lNGExtensions -lEOControl
61 sope-mime-libs = -lNGMime
62 sope-ngobjweb-libs = -lNGObjWeb
63 else
64 sope-xml-libs  = -framework XmlRpc -framework DOM -framework SaxObjC
65 sope-core-libs = \
66   -framework NGStreams -framework NGExtensions -framework EOControl
67 sope-mime-libs = -framework NGMime -framework NGMail
68 sope-ngobjweb-libs = -framework NGObjWeb 
69 endif
70
71 libNGObjWeb_LIBRARIES_DEPEND_UPON += \
72         $(sope-mime-libs) \
73         $(sope-core-libs) \
74         $(sope-xml-libs)
75 NGObjWeb_LIBRARIES_DEPEND_UPON += \
76         $(sope-mime-libs) \
77         $(sope-core-libs)\
78         $(sope-xml-libs)
79
80
81 ADDITIONAL_LIB_DIRS  += $(libNGObjWeb_LIB_DIRS) -F.
82
83 wod_TOOL_LIBS += \
84         $(sope-ngobjweb-libs)   \
85         $(sope-mime-libs)       \
86         $(sope-core-libs)       \
87         $(sope-xml-libs)
88 SoCore_BUNDLE_LIBS += \
89         $(sope-ngobjweb-libs)   \
90         $(sope-mime-libs)       \
91         $(sope-core-libs)       \
92         $(sope-xml-libs)
93
94
95 # platform specific settings
96
97 ifneq ($(findstring openbsd3, $(GNUSTEP_TARGET_OS)), openbsd3)
98 # OpenBSD does not require libcrypt
99 ifneq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
100 # and neither does MacOSX? ...
101 libNGObjWeb_LIBRARIES_DEPEND_UPON += -lcrypt
102 endif
103 endif
104
105 # Apple
106
107 ifeq ($(FOUNDATION_LIB),apple)
108 libNGObjWeb_PREBIND_ADDR="0xC4900000"
109 libNGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
110 NGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
111 endif
112
113 ifeq ($(FOUNDATION_LIB),nx)
114 wod_TOOL_LIBS += -lDOM -lSaxObjC -lFoundationExt
115 wod_LDFLAGS += -framework Foundation
116 libNGObjWeb_LIBRARIES_DEPEND_UPON += -lFoundationExt
117 endif
118
119 ifeq ($(findstring openbsd3, $(GNUSTEP_TARGET_OS)), openbsd3)
120 wod_TOOL_LIBS += -liconv
121 endif