File: GNUmakefile.preamble

package info (click to toggle)
sope 4.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,492 kB
  • sloc: objc: 167,993; sh: 3,648; ansic: 3,405; python: 318; makefile: 189
file content (89 lines) | stat: -rw-r--r-- 1,984 bytes parent folder | download | duplicates (7)
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
# compiler flags

SOPE_ROOT=../..

ADDITIONAL_INCLUDE_DIRS += \
	-I..				\
	-I../../sope-core/NGExtensions	\
	-I../../sope-core		\
	-I/usr/local/include

ADDITIONAL_CPPFLAGS += -Wall -Wno-protocol


# dependencies

libNGLdap_LIBRARIES_DEPEND_UPON += \
	-lNGExtensions -lEOControl	\
	$(BASE_LIBS)

NGLdap_LIBRARIES_DEPEND_UPON += \
	-framework NGExtensions -framework EOControl	\
	-framework DOM -framework SaxObjC


# OpenLDAP library dependencies

ifeq ($(reentrant),yes)
ADDITIONAL_CPPFLAGS += -D_REENTRANT=1
libNGLdap_LIBRARIES_DEPEND_UPON += -lldap_r -llber -lpthread
NGLdap_LIBRARIES_DEPEND_UPON    += -lldap_r -llber -lpthread
else
libNGLdap_LIBRARIES_DEPEND_UPON += -lldap -llber
NGLdap_LIBRARIES_DEPEND_UPON    += -lldap -llber
endif


# SASL/SSL dependencies

ifneq ($(FOUNDATION_LIB),nx)

ifeq ($(sasl),yes)
libNGLdap_LIBRARIES_DEPEND_UPON += -lsasl
endif

else # is NeXT/Apple Foundation

# TODO: document whether Foundation includes required dependencies
ADDITIONAL_LDFLAGS += -framework Foundation

endif


# library/framework search pathes

DEP_DIRS = \
	$(SOPE_ROOT)/sope-core/NGStreams	\
	$(SOPE_ROOT)/sope-core/NGExtensions	\
	$(SOPE_ROOT)/sope-core/EOControl	\
	$(SOPE_ROOT)/sope-xml/DOM		\
	$(SOPE_ROOT)/sope-xml/SaxObjC

ifneq ($(frameworks),yes)
ADDITIONAL_LIB_DIRS += \
	$(foreach dir,$(DEP_DIRS),\
	  -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
ADDITIONAL_LIB_DIRS += \
	$(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif

ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
SYSTEM_LIB_DIR += -L/usr/local/lib64
else
SYSTEM_LIB_DIR += -L/usr/local/lib
endif

# Apple

ifeq ($(FOUNDATION_LIB),apple)
libNGLdap_PREBIND_ADDR="0xC1C00000"
libNGLdap_LDFLAGS += -seg1addr $(libNGLdap_PREBIND_ADDR)
NGLdap_LDFLAGS += -seg1addr $(libNGLdap_PREBIND_ADDR)
endif

# only required on 10.2 and before?
#ifneq ($(FOUNDATION_LIB),apple)
#ADDITIONAL_INCLUDE_DIRS += -I/usr/local/openldap/include
#SYSTEM_LIB_DIR += -L/usr/local/openldap/lib
#endif