]> err.no Git - sope/blob - sope-appserver/NGObjWeb/GNUmakefile.preamble
fixed a osx library dependency
[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                  \
36         $(SOPE_ROOT)/sope-core/NGStreams        \
37         $(SOPE_ROOT)/sope-core/NGExtensions     \
38         $(SOPE_ROOT)/sope-core/EOControl        \
39         $(SOPE_ROOT)/sope-xml/DOM               \
40         $(SOPE_ROOT)/sope-xml/XmlRpc            \
41         $(SOPE_ROOT)/sope-xml/SaxObjC
42
43 ifneq ($(frameworks),yes)
44 ADDITIONAL_LIB_DIRS += \
45         $(foreach dir,$(DEP_DIRS),\
46           -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
47 else
48 ADDITIONAL_LIB_DIRS += \
49         $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
50 endif
51
52 SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
53
54
55 # dependencies
56
57 ifneq ($(frameworks),yes)
58 sope-xml-libs  = -lXmlRpc -lDOM -lSaxObjC
59 sope-core-libs = -lNGStreams -lNGExtensions -lEOControl
60 sope-mime-libs = -lNGMime
61 sope-ngobjweb-libs = -lNGObjWeb
62 else
63 sope-xml-libs  = -framework XmlRpc -framework DOM -framework SaxObjC
64 sope-core-libs = \
65   -framework NGStreams -framework NGExtensions -framework EOControl
66 sope-mime-libs = -framework NGMime -framework NGMail
67 sope-ngobjweb-libs = -framework NGObjWeb 
68 endif
69
70 libNGObjWeb_LIBRARIES_DEPEND_UPON += \
71         $(sope-mime-libs) \
72         $(sope-core-libs) \
73         $(sope-xml-libs)
74 NGObjWeb_LIBRARIES_DEPEND_UPON += \
75         $(sope-mime-libs) \
76         $(sope-core-libs)\
77         $(sope-xml-libs)
78
79
80 ADDITIONAL_LIB_DIRS  += $(libNGObjWeb_LIB_DIRS) -F.
81
82 wod_TOOL_LIBS += \
83         $(sope-ngobjweb-libs)   \
84         $(sope-mime-libs)       \
85         $(sope-core-libs)       \
86         $(sope-xml-libs)
87 SoCore_BUNDLE_LIBS += \
88         $(sope-ngobjweb-libs)   \
89         $(sope-mime-libs)       \
90         $(sope-core-libs)       \
91         $(sope-xml-libs)
92
93
94 # platform specific settings
95
96 ifneq ($(findstring openbsd3, $(GNUSTEP_TARGET_OS)), openbsd3)
97 # OpenBSD does not require libcrypt
98 ifneq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
99 # and neither does MacOSX? ...
100 libNGObjWeb_LIBRARIES_DEPEND_UPON += -lcrypt
101 endif
102 endif
103
104 # Apple
105
106 ifeq ($(FOUNDATION_LIB),apple)
107 libNGObjWeb_PREBIND_ADDR="0xC4900000"
108 libNGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
109 NGObjWeb_LDFLAGS += -seg1addr $(libNGObjWeb_PREBIND_ADDR)
110 endif
111
112 ifeq ($(FOUNDATION_LIB),nx)
113 wod_TOOL_LIBS += -lDOM -lSaxObjC -lFoundationExt
114 wod_LDFLAGS += -framework Foundation
115 libNGObjWeb_LIBRARIES_DEPEND_UPON += -lFoundationExt
116 endif
117
118 ifeq ($(findstring openbsd3, $(GNUSTEP_TARGET_OS)), openbsd3)
119 wod_TOOL_LIBS += -liconv
120 endif