Changeset 493cb97
- Timestamp:
- 05/29/15 02:39:15 (9 years ago)
- 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)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r430548b r493cb97 5 5 LDFLAGS = -lpthread -ldl 6 6 7 all: libmemlog.so memlog .o7 all: libmemlog.so memlog_s.o 8 8 9 memlog .o: memlog.c10 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o memlog .o memlog.c9 memlog_s.o: memlog.c 10 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o memlog_s.o memlog.c 11 11 12 12 libmemlog.so: memlog.c … … 14 14 15 15 clean: 16 rm -f memlog .o libmemlog.so16 rm -f memlog_s.o libmemlog.so 17 17 -
memlog.c
r3105f50 r493cb97 22 22 23 23 #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 24 28 25 29 FILE *log_file = NULL;
Note: See TracChangeset
for help on using the changeset viewer.