diff options
author | Lukas Larsson <[email protected]> | 2011-08-01 16:39:39 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-08-01 16:39:39 +0200 |
commit | 61edfb4268b8fa4e70d9ba6b1a18652f946671c1 (patch) | |
tree | 0ae814e5a543927c71b4b7f0c569cc41f874c6d6 /lib/asn1/c_src/Makefile | |
parent | a9b234504e155f1c44d7d1f93532c3224e10f439 (diff) | |
parent | e03878664047f86735797c30e9ba1b5917cd9f27 (diff) | |
download | otp-61edfb4268b8fa4e70d9ba6b1a18652f946671c1.tar.gz otp-61edfb4268b8fa4e70d9ba6b1a18652f946671c1.tar.bz2 otp-61edfb4268b8fa4e70d9ba6b1a18652f946671c1.zip |
Merge branch 'lukas/asn1/driver_to_nifs/OTP-9419' into major
* lukas/asn1/driver_to_nifs/OTP-9419: (26 commits)
Update decode_open_type to use nifs if configured to do so
Add -deprecated attributes
Update tag to be ints instead of longs
Update asn1 nif to handle calls with an empty binary
Add obsolete warning for driver option
Correct mistake in driver -> nif translation
Cannot be a binary as decode creates tuples
Remove DRIVER target from opt target
Update documentation with replacement of driver with nif
return 0 as error code when an unknown error happens
Remove all modules relating to drivers and make all functions obsolete.
Remove driver support for per encoding Handle the new error messages from the asn1 nifs Remove dead code for erlang optimized per decode
Remove driver support for ber decoding Handle the new error messages from the asn1 nifs Make ber nif decoding use the erlang fallback if the nif could not be loaded. This is useful for application which use inline (such as public_key) and want to work without the nifs, but should use them if they exist
Add load, upgrade and purge functions for asn1 nifs
Add better error messages to nifs
Exclude nif module from cover
Expand per and ber performance suites with parallel asn1 runs
Add documentation for nif interface
Fix bootstrap problem
Add nif vs driver vs erlang performance tests for per encode and ber decode. Results now suggest that nifs are 15% faster than driver for per and 5% faster for ber. Erlang is inbetween nif and driver for ber, but about 50% slower than driver for per.
...
Diffstat (limited to 'lib/asn1/c_src/Makefile')
-rw-r--r-- | lib/asn1/c_src/Makefile | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile index 9e9cb18524..60543df355 100644 --- a/lib/asn1/c_src/Makefile +++ b/lib/asn1/c_src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2010. All Rights Reserved. +# Copyright Ericsson AB 2002-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -51,33 +51,26 @@ EI_LIBDIR = $(ERL_TOP)/lib/erl_interface/obj$(TYPEMARKER)/$(TARGET) # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- -EI_INCLUDES = -I$(ERL_TOP)/lib/erl_interface/include CFLAGS = $(DED_INCLUDES) $(EI_INCLUDES) $(DED_CFLAGS) LDFLAGS += $(DED_LDFLAGS) -LD_INCL_EI = -L$(EI_LIBDIR) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- -C_FILES = asn1_erl_driver.c +NIF_OBJ_FILES = $(OBJDIR)/asn1_erl_nif.o ifeq ($(TARGET),win32) -LD_EI = -lei_md -SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.dll -OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o +NIF_SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_nif.dll CLIB_FLAGS = LN=cp else -LD_EI = -lei -OBJ_FILES = $(OBJDIR)/asn1_erl_drv.o ifeq ($(findstring vxworks,$(TARGET)),vxworks) -SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.eld +NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1_erl_nif.eld CLIB_FLAGS = else -SHARED_OBJ_FILES = $(LIBDIR)/asn1_erl_drv.so +NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1_erl_nif.so CLIB_FLAGS = -lc endif LN= ln -s @@ -87,7 +80,7 @@ endif # Targets # ---------------------------------------------------- -opt: $(OBJDIR) $(LIBDIR) $(SHARED_OBJ_FILES) +opt: $(OBJDIR) $(LIBDIR) $(NIF_SHARED_OBJ_FILE) debug: opt @@ -103,11 +96,11 @@ docs: # ---------------------------------------------------- -$(OBJ_FILES): $(C_FILES) - $(CC) -c $(CFLAGS) -o $(OBJ_FILES) $(C_FILES) +$(OBJDIR)/%.o: %.c + $(CC) -c $(CFLAGS) -O3 -o $@ $< -$(SHARED_OBJ_FILES): $(OBJ_FILES) - $(LD) $(LDFLAGS) $(LD_INCL_EI) -o $(SHARED_OBJ_FILES) $(OBJ_FILES) $(LD_EI) $(CLIB_FLAGS) $(LIBS) +$(NIF_SHARED_OBJ_FILE): $(NIF_OBJ_FILES) + $(LD) $(LDFLAGS) -o $(NIF_SHARED_OBJ_FILE) $(NIF_OBJ_FILES) $(CLIB_FLAGS) $(LIBS) $(LIBDIR): -mkdir -p $(LIBDIR) @@ -124,9 +117,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) $(RELSYSDIR)/priv/lib - $(INSTALL_PROGRAM) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib + $(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) $(RELSYSDIR)/priv/lib $(INSTALL_DIR) $(RELSYSDIR)/c_src - $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src + $(INSTALL_DATA) *.c $(RELSYSDIR)/c_src release_docs_spec: |