Moving some files and cleaning up.
This commit is contained in:
parent
8cafb25c42
commit
073c210814
16 changed files with 62 additions and 61 deletions
|
|
@ -1,21 +1,15 @@
|
|||
# Test makefile
|
||||
DEFS= -D__DEBUG__
|
||||
CC=gcc
|
||||
CFLAGS=-g
|
||||
CFLAGS=-g -D__DEBUG__
|
||||
LDFLAGS=-L/usr/lib64/mysql -lmysqlclient
|
||||
|
||||
all :
|
||||
make rbtree
|
||||
make inotify
|
||||
make mysql
|
||||
all : raw_inotify strbuf path rbtree inotify tree indexer mysql queue
|
||||
|
||||
raw_inotify :
|
||||
$(CC) -linotifytools raw_inotify.c -o raw_inotify
|
||||
$(CC) -linotifytools t_raw_inotify.c -o test_raw_inotify
|
||||
|
||||
strbuf :
|
||||
$(CC) $(CFLAGS) ../src/common/strbuf.c t_strbuf.c -o test_strbuf
|
||||
|
||||
config :
|
||||
$(CC) ../src/common/config.c t_config.c -o test_config
|
||||
|
||||
path :
|
||||
$(CC) $(DEFS) $(CFLAGS) unit.c ../src/common/path.c t_path.c -o test_path
|
||||
|
|
@ -27,20 +21,30 @@ inotify :
|
|||
$(CC) -lpthread -D INOTIFY_DEBUG -D RB_DEBUG $(CFLAGS) \
|
||||
../src/common/rbtree.c \
|
||||
../src/common/path.c \
|
||||
../src/fs/scan.c \
|
||||
../src/fs/notify_event.c \
|
||||
../src/fs/inotify.c \
|
||||
../src/notify/event.c \
|
||||
../src/notify/tree.c \
|
||||
../src/notify/inotify.c \
|
||||
t_inotify.c -o test_inotify
|
||||
|
||||
tree :
|
||||
$(CC) $(CFLAGS) $(DEFS) ../src/common/path.c ../src/fs/tree.c t_tree.c -o test_tree
|
||||
$(CC) $(CFLAGS) ../src/common/path.c ../src/notify/tree.c t_tree.c -o test_tree
|
||||
|
||||
indexer :
|
||||
$(CC) $(CFLAGS) -D__DEBUG__ ../src/common/path.c ../src/fs/tree.c ../src/indexer.c t_indexer.c -o test_indexer
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
../src/common/rbtree.c \
|
||||
../src/common/path.c \
|
||||
../src/notify/tree.c \
|
||||
../src/notify/inotify.c \
|
||||
../src/notify/event.c \
|
||||
../src/arch/mysql.c \
|
||||
../src/indexer.c \
|
||||
t_indexer.c -o test_indexer
|
||||
|
||||
mysql :
|
||||
$(CC) -D DB_DEBUG $(CFLAGS) ../src/arch/mysql.c -L/usr/lib64/mysql \
|
||||
-lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto t_mysql.c -o test_mysql
|
||||
$(CC) -D DB_DEBUG $(CFLAGS) $(LDFLAGS) ../src/arch/mysql.c t_mysql.c -o test_mysql
|
||||
|
||||
queue :
|
||||
$(CC) $(CFLAGS) ../src/fs/queue.c t_queue.c -o test_queue
|
||||
$(CC) $(CFLAGS) ../src/notify/queue.c t_queue.c -o test_queue
|
||||
|
||||
clean :
|
||||
rm -f test_*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "../src/fs/notify.h"
|
||||
#include "../src/notify/notify.h"
|
||||
|
||||
PROT_SCAN_CALLBACK(my_callback) {
|
||||
//printf("FROM THREAD -- path: %s; is_dir = %i\n", path, dir);
|
||||
|
|
@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
|
|||
"Filename: %s\n"
|
||||
"Directory: %u\n"
|
||||
"====================\n"
|
||||
, notify_event_masktostr(event), event->path, event->filename, event->dir);
|
||||
, notify_event_typetostr(event), event->path, event->filename, event->dir);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include "../src/fs/queue.h"
|
||||
#include "../src/notify/queue.h"
|
||||
|
||||
int main() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "../src/fs/tree.h"
|
||||
#include "../src/notify/tree.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
|
|
|
|||
Reference in a new issue