Skip to content

Commit

Permalink
OPIC-34 restructured directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dryman committed Mar 26, 2017
1 parent a435431 commit 73059df
Show file tree
Hide file tree
Showing 42 changed files with 16 additions and 57 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
SUBDIRS = src
SUBDIRS = opic

nobase_include_HEADERS = \
opic/op_malloc.h \
opic/demomalloc.h
7 changes: 3 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_INIT([OPIC],[0.3])
AC_CONFIG_SRCDIR([README.md])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER([src/config.h])
AM_CONFIG_HEADER([config.h])

AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AM_PROG_AR
Expand Down Expand Up @@ -46,9 +46,8 @@ PKG_CHECK_MODULES([cmocka], [cmocka >= 1.0.1])

AC_CONFIG_FILES([
Makefile
src/Makefile
src/opic/Makefile
src/opic/malloc/Makefile
opic/Makefile
opic/malloc/Makefile
])

AC_OUTPUT
4 changes: 1 addition & 3 deletions src/opic/Makefile.am → opic/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SUBDIRS = malloc

AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/src
AM_CPPFLAGS = -I$(top_srcdir)

lib_LTLIBRARIES = libdemomalloc.la

Expand All @@ -13,5 +13,3 @@ libdemomalloc_la_SOURCES = \
malloc/lookup_helper.c

libdemomalloc_la_LIBADD = @atomic_LIBS@

include_HEADERS = demomalloc.h op_malloc.h
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/opic/demomalloc.h → opic/demomalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ void* OPDemoRealloc(void* addr, size_t size)

void OPDemoFree(void* addr);

/*
* Somehow I cannot compile the code below on OSX.
* Since replacing malloc is not the major goal, I'll just leave it here.
*/

/*
void* malloc(size_t size)
__attribute__((weak, alias("OPDemoMalloc"))) __attribute__((malloc));
Expand All @@ -76,6 +81,7 @@ void* realloc(void* addr, size_t size)
void free(void* addr)
__attribute__((weak, alias("OPDemoFree")));
*/

OP_END_DECLS

Expand Down
2 changes: 1 addition & 1 deletion src/opic/malloc/Makefile.am → opic/malloc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS = -I$(top_srcdir)/src
AM_CPPFLAGS = -I$(top_srcdir)
AM_CFLAGS = @cmocka_CFLAGS@

TESTS = lookup_helper_test init_helper_test allocator_test \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 0 additions & 48 deletions src/Makefile.am

This file was deleted.

0 comments on commit 73059df

Please sign in to comment.