~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/crypto/c_src/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# %CopyrightBegin%
3
 
4
 
# Copyright Ericsson AB 1999-2009. All Rights Reserved.
5
 
 
3
#
 
4
# Copyright Ericsson AB 1999-2010. All Rights Reserved.
 
5
#
6
6
# The contents of this file are subject to the Erlang Public License,
7
7
# Version 1.1, (the "License"); you may not use this file except in
8
8
# compliance with the License. You should have received a copy of the
9
9
# Erlang Public License along with this software. If not, it can be
10
10
# retrieved online at http://www.erlang.org/.
11
 
 
11
#
12
12
# Software distributed under the License is distributed on an "AS IS"
13
13
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
# the License for the specific language governing rights and limitations
15
15
# under the License.
16
 
 
16
#
17
17
# %CopyrightEnd%
18
18
#
19
19
include $(ERL_TOP)/make/target.mk
68
68
# ----------------------------------------------------
69
69
# Misc Macros
70
70
# ----------------------------------------------------
71
 
OBJS = $(OBJDIR)/crypto_drv.o
72
 
DRV_MAKEFILE = $(PRIVDIR)/Makefile
 
71
OBJS = $(OBJDIR)/crypto$(TYPEMARKER).o
 
72
NIF_MAKEFILE = $(PRIVDIR)/Makefile
73
73
 
74
74
ifeq ($(findstring win32,$(TARGET)), win32)
75
 
DYN_DRIVER = $(LIBDIR)/crypto_drv.dll
 
75
NIF_LIB = $(LIBDIR)/crypto$(TYPEMARKER).dll
76
76
else
77
 
DYN_DRIVER = $(LIBDIR)/crypto_drv.so
 
77
NIF_LIB = $(LIBDIR)/crypto$(TYPEMARKER).so
78
78
endif
79
79
 
80
80
ifeq ($(HOST_OS),)
81
81
HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
82
82
endif
83
83
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
84
 
LD_R_FLAG=@DED_LD_FLAG_RUNTIME_LIBRARY_PATH@
85
 
ifeq ($(strip $(LD_R_FLAG)),)
86
 
LD_R_OPT =
87
 
else
88
 
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
89
 
LD_R_OPT = $(LD_R_FLAG)$(SSL_LIBDIR)
90
 
else
91
 
LD_R_OPT =
92
 
endif
93
 
endif
94
84
 
95
85
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
96
 
CRYPTO_LINK_LIB=-L$(SSL_LIBDIR) -lcrypto
 
86
SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
 
87
CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -lcrypto
97
88
else
 
89
SSL_DED_LD_RUNTIME_LIBRARY_PATH=
98
90
CRYPTO_LINK_LIB=$(SSL_LIBDIR)/libcrypto.a 
99
91
endif
100
92
 
102
94
# Targets
103
95
# ----------------------------------------------------
104
96
 
105
 
debug opt valgrind: $(OBJDIR) $(LIBDIR) $(DYN_DRIVER)
 
97
debug opt valgrind: $(OBJDIR) $(LIBDIR) $(NIF_LIB)
106
98
 
107
99
$(OBJDIR):
108
100
        -@mkdir -p $(OBJDIR)
110
102
$(LIBDIR):
111
103
        -@mkdir -p $(LIBDIR)
112
104
 
113
 
$(OBJDIR)/%.o: %.c
 
105
$(OBJDIR)/%$(TYPEMARKER).o: %.c
114
106
        $(INSTALL_DIR) $(OBJDIR)
115
107
        $(CC) -c -o $@ $(ALL_CFLAGS) $<
116
108
 
117
 
$(LIBDIR)/crypto_drv.so: $(OBJS)
 
109
$(LIBDIR)/crypto$(TYPEMARKER).so: $(OBJS)
118
110
        $(INSTALL_DIR) $(LIBDIR) 
119
 
        $(LD) $(LDFLAGS) $(LD_R_OPT) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB)
 
111
        $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB)
120
112
 
121
 
$(LIBDIR)/crypto_drv.dll: $(OBJS)
 
113
$(LIBDIR)/crypto$(TYPEMARKER).dll: $(OBJS)
122
114
        $(INSTALL_DIR) $(LIBDIR)
123
 
        $(LD) $(LDFLAGS) -o $@ -L$(SSL_LIBDIR) $(OBJS) -llibeay32
 
115
        $(LD) $(LDFLAGS) -o $@  $(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) $(OBJS) -llibeay32
124
116
 
125
117
clean:
126
 
        rm -f $(DYN_DRIVER) $(OBJS)
 
118
ifeq ($(findstring win32,$(TARGET)), win32)
 
119
        rm -f $(LIBDIR)/crypto.dll
 
120
        rm -f $(LIBDIR)/crypto.debug.dll
 
121
else
 
122
        rm -f $(LIBDIR)/crypto.so
 
123
        rm -f $(LIBDIR)/crypto.debug.so
 
124
        rm -f $(LIBDIR)/crypto.valgrind.so
 
125
endif
 
126
        rm -f $(OBJDIR)/crypto.o
 
127
        rm -f $(OBJDIR)/crypto.debug.o
 
128
        rm -f $(OBJDIR)/crypto.valgrind.o
127
129
        rm -f core *~
128
130
 
129
131
docs:
136
138
release_spec: opt
137
139
        $(INSTALL_DIR) $(RELSYSDIR)/priv/obj
138
140
        $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
139
 
        $(INSTALL_PROGRAM) $(DRV_MAKEFILE) $(RELSYSDIR)/priv/obj
 
141
        $(INSTALL_DATA) $(NIF_MAKEFILE) $(RELSYSDIR)/priv/obj
140
142
        $(INSTALL_PROGRAM) $(OBJS) $(RELSYSDIR)/priv/obj
141
 
        $(INSTALL_PROGRAM) $(DYN_DRIVER) $(RELSYSDIR)/priv/lib
 
143
        $(INSTALL_PROGRAM) $(NIF_LIB) $(RELSYSDIR)/priv/lib
142
144
 
143
145
release_docs_spec:
144
146