Changeset 493cb97


Ignore:
Timestamp:
05/29/15 02:39:15 (9 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master
Children:
1e5cce6
Parents:
747d2b1
git-author:
Hal Finkel <hfinkel@…> (05/29/15 02:39:15)
git-committer:
Hal Finkel <hfinkel@…> (05/29/15 02:39:15)
Message:

static linking comment; make static .o memlog_s.o

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r430548b r493cb97  
    55LDFLAGS = -lpthread -ldl 
    66 
    7 all: libmemlog.so memlog.o 
     7all: libmemlog.so memlog_s.o 
    88 
    9 memlog.o: memlog.c 
    10         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o memlog.o memlog.c 
     9memlog_s.o: memlog.c 
     10        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o memlog_s.o memlog.c 
    1111 
    1212libmemlog.so: memlog.c 
     
    1414 
    1515clean: 
    16         rm -f memlog.o libmemlog.so 
     16        rm -f memlog_s.o libmemlog.so 
    1717 
  • memlog.c

    r3105f50 r493cb97  
    2222 
    2323#include <dlfcn.h> 
     24 
     25// NOTE: When static linking, this depends on linker wrapping. 
     26// Add to your LDFLAGS: 
     27//   -Wl,--wrap,malloc,--wrap,free,--wrap,realloc,--wrap,calloc,--wrap,memalign /path/to/memlog_s.o -lpthread -ldl 
    2428 
    2529FILE *log_file = NULL; 
Note: See TracChangeset for help on using the changeset viewer.