Browse Source

install configuration header file inside the dmmlib directory

Ioannis Koutras 12 years ago
parent
commit
e2ddba7500

+ 4 - 4
CMakeLists.txt

@@ -107,15 +107,15 @@ if(STATS STREQUAL "global")
 endif(STATS STREQUAL "global")
 
 configure_file (
-	"${PROJECT_SOURCE_DIR}/dmm_config.h.in"
-	"${PROJECT_BINARY_DIR}/dmm_config.h"
+	"${PROJECT_SOURCE_DIR}/config.h.cmake"
+	"${PROJECT_BINARY_DIR}/dmmlib/config.h"
 )
 
 install(
   FILES
-    ${PROJECT_BINARY_DIR}/dmm_config.h
+    ${PROJECT_BINARY_DIR}/dmmlib/config.h
   DESTINATION
-    ${INCLUDE_INSTALL_DIR}
+    ${INCLUDE_INSTALL_DIR}/dmmlib
   COMPONENT
     headers
 )

+ 5 - 6
dmm_config.h.in

@@ -1,5 +1,5 @@
 /*
- *   Copyright Institute of Communication and Computer Systems (ICCS) 
+ *   Copyright Institute of Communication and Computer Systems (ICCS)
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -16,14 +16,13 @@
  */
 
 /**
- * @file   dmm_config.h
+ * @file   dmmlib/config.h
  * @author Ioannis Koutras (joko@microlab.ntua.gr)
- * @date   November 2012
+ * @date   December 2012
  * @brief  Macro defines for dmmlib.
  *
- * Warning: This is a file which is generated automatically, you have to
- * configure, compile and install dmmlib again in order to change the following
- * macros.
+ * Warning: This is an automatically-generated file, you have to configure,
+ * compile and install dmmlib again in order to change the following macros.
  */
 
 #ifndef DMM_CONFIG_H

+ 1 - 1
examples/test_for_memory_space_aware.c

@@ -3,7 +3,7 @@
 #include <assert.h>
 #include <dmmlib/initialize_allocator.h>
 #include <dmmlib/dmmlib.h>
-#include <dmm_config.h>
+#include <dmmlib/config.h>
 
 #define ALLOCATOR_SIZE 2*MAX_COAL_SIZE*sizeof(char)
 

+ 1 - 1
include/dmmlib/allocator.h

@@ -24,7 +24,7 @@
 
 #ifndef ALLOCATOR_H
 #define ALLOCATOR_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include "dmmlib/raw_block.h"
 
 #ifdef HAVE_LOCKS

+ 1 - 1
include/dmmlib/freelist/block_header.h

@@ -29,7 +29,7 @@
 #include <stddef.h>
 #include <stdbool.h>
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include "dmmlib/lists.h"
 
 /** The header structure of every memory block inside a heap. */

+ 1 - 1
include/dmmlib/freelist/freelist.h

@@ -23,7 +23,7 @@
 
 #ifndef FREELIST_H
 #define FREELIST_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/freelist/freelist_rb.h"
 

+ 1 - 1
include/dmmlib/knobs.h

@@ -25,7 +25,7 @@
 #ifndef KNOBS_H
 #define KNOBS_H
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <dmmlib/dmmstats.h>
 

+ 2 - 2
include/dmmlib/raw_block.h

@@ -1,5 +1,5 @@
 /*
- *   Copyright Institute of Communication and Computer Systems (ICCS) 
+ *   Copyright Institute of Communication and Computer Systems (ICCS)
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
 
 #ifndef RAW_BLOCK_H
 #define RAW_BLOCK_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <stddef.h>
 

+ 1 - 1
private-include/bitmap/bitmap.h

@@ -23,7 +23,7 @@
 
 #ifndef BITMAP_H
 #define BITMAP_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "bitmap/bitmap_rb.h"
 

+ 1 - 1
private-include/bitmap/bitmap_other.h

@@ -24,7 +24,7 @@
 
 #ifndef BITMAP_OTHER_H
 #define BITMAP_OTHER_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "bitmap/bitmap_rb.h"
 

+ 1 - 1
private-include/bitmap/bitmap_rb.h

@@ -24,7 +24,7 @@
 
 #ifndef BITMAP_RB_H
 #define BITMAP_RB_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <inttypes.h>
 #include <limits.h>

+ 1 - 1
private-include/bitmap/debug.h

@@ -24,7 +24,7 @@
 
 #ifndef BITMAP_DEBUG_H
 #define BITMAP_DEBUG_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "bitmap/bitmap_rb.h"
 

+ 1 - 1
private-include/debug.h

@@ -24,7 +24,7 @@
 
 #ifndef DEBUG_H
 #define DEBUG_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/allocator.h"
 #include "dmmlib/raw_block.h"

+ 1 - 1
private-include/default_rb.h

@@ -26,7 +26,7 @@
 #ifndef DEFAULT_RB_H
 #define DEFAULT_RB_H
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifdef BITMAP_RB_ONLY
 #include "bitmap/bitmap.h"

+ 1 - 1
private-include/freelist/coalesce.h

@@ -17,7 +17,7 @@
 
 #ifndef COALESCE_H
 #define COALESCE_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/freelist/freelist_rb.h"
 #include "dmmlib/freelist/block_header.h"

+ 1 - 1
private-include/freelist/fitting_policy.h

@@ -26,7 +26,7 @@
 #ifndef FL_FITTING_POLICY_H
 #define FL_FITTING_POLICY_H
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 /**
  * @def SEARCH_LIST

+ 1 - 1
private-include/freelist/freelist_debug.h

@@ -24,7 +24,7 @@
 
 #ifndef FREELIST_DEBUG_H
 #define FREELIST_DEBUG_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/freelist/freelist_rb.h"
 

+ 1 - 1
private-include/freelist/ordering_policy.h

@@ -26,7 +26,7 @@
 #ifndef FL_ORDERING_POLICY_H
 #define FL_ORDERING_POLICY_H
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/lists.h"
 

+ 1 - 1
private-include/freelist/split.h

@@ -17,7 +17,7 @@
 
 #ifndef SPLIT_H
 #define SPLIT_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/freelist/freelist_rb.h"
 #include "dmmlib/freelist/block_header.h"

+ 1 - 1
private-include/locks.h

@@ -22,7 +22,7 @@
  * @brief  Locking functions
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifndef LOCKS_H
 #define LOCKS_H

+ 2 - 2
private-include/other.h

@@ -1,5 +1,5 @@
 /*
- *   Copyright Institute of Communication and Computer Systems (ICCS) 
+ *   Copyright Institute of Communication and Computer Systems (ICCS)
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
 
 #ifndef OTHER_H
 #define OTHER_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "dmmlib/raw_block.h"
 

+ 1 - 1
private-include/statistics.h

@@ -24,7 +24,7 @@
 
 #ifndef STATISTICS_H
 #define STATISTICS_H
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <inttypes.h>
 #include "dmmlib/dmmstats.h"

+ 1 - 1
private-include/sys_alloc.h

@@ -18,7 +18,7 @@
 #ifndef SYS_ALLOC_H
 #define SYS_ALLOC_H
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include <dmmlib/pool.h>
 
 void *sys_alloc(pool_t *pool, size_t size);

+ 1 - 1
private-include/trace.h

@@ -24,7 +24,7 @@
 
 #ifndef _DMMLIB_TRACE_H_
 #define _DMMLIB_TRACE_H_
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifdef WITH_MEM_TRACE
 #include <stdio.h>

+ 1 - 1
src/freelist/coalesce.c

@@ -15,7 +15,7 @@
  *
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifdef WITH_KNOBS
 #include "dmmlib/dmmlib.h"

+ 1 - 1
src/freelist/fitting/best.c

@@ -15,7 +15,7 @@
  *
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "freelist/fitting/best.h"
 #include "freelist/ordering_policy.h"

+ 1 - 1
src/freelist/fitting/first.c

@@ -15,7 +15,7 @@
  *
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "freelist/fitting/first.h"
 #include "freelist/ordering_policy.h"

+ 1 - 1
src/freelist/fitting/good.c

@@ -15,7 +15,7 @@
  *
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifdef WITH_KNOBS
 #include "dmmlib/dmmlib.h"

+ 1 - 1
src/freelist/split.c

@@ -17,7 +17,7 @@
 
 #include "freelist/split.h"
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #ifdef WITH_KNOBS
 #include "dmmlib/dmmlib.h"

+ 1 - 1
src/initialize.c

@@ -22,7 +22,7 @@
  * @brief  System allocator's global object initializer.
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include "dmmlib/dmmlib.h"
 
 /** Global variable storing allocator's settings */

+ 1 - 1
src/knobs.c

@@ -22,7 +22,7 @@
  * @brief  Knobs initialization and configuration routines.
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include "dmmlib/dmmlib.h"
 
 #include "locks.h"

+ 1 - 1
src/memalign.c

@@ -30,7 +30,7 @@
 #include <sys/mman.h>
 #include <assert.h>
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 #include "dmmlib/dmmlib.h"
 #include "memcpy.h"
 #include "locks.h"

+ 1 - 1
src/parse_env.c

@@ -22,7 +22,7 @@
  * @brief  Parse the DMMLIB_OPTS enviroment variable.
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <stdlib.h>
 #include <string.h>

+ 1 - 1
src/print_stats.c

@@ -16,7 +16,7 @@
  */
 
 #include <dmmlib/print_stats.h>
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include <stdio.h>
 

+ 1 - 1
src/request_memory_mmap_linux.c

@@ -22,7 +22,7 @@
  * \brief  Request additional memory space via mmap() in Linux.
  */
 
-#include "dmm_config.h"
+#include <dmmlib/config.h>
 
 #include "request_memory.h"
 #include <sys/stat.h> /* for open() */