Skip to content

Commit

Permalink
let users choose install PREFIX, removed some warning
Browse files Browse the repository at this point in the history
  • Loading branch information
drotiro committed Nov 5, 2013
1 parent ccdc471 commit 5093220
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -4,9 +4,11 @@ PKGS = fuse libxml-2.0 libcurl libapp libjson
FLAGS = $(shell pkg-config ${PKGS} --cflags) -g ${CFLAGS}
LIBS = $(shell pkg-config ${PKGS} --libs) -lpthread
OBJS = boxfs.o boxapi.o boxpath.o boxhttp.o boxopts.o boxjson.o boxcache.o boxutils.o
PREFIX = /usr/local
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin

.PHONY: clean install check_pkg

# Targets
boxfs: check_pkg $(OBJS)
@echo "Building $@"
Expand All @@ -16,8 +18,6 @@ boxfs: check_pkg $(OBJS)
@echo Compiling $<
$(CC) $(FLAGS) -c $< -o $@

.PHONY: clean install check_pkg

clean:
rm -f $(OBJS) *~ boxfs

Expand Down
9 changes: 7 additions & 2 deletions boxapi.c
Expand Up @@ -500,11 +500,16 @@ int api_removefile(const char * path)
}

boxpath_free(bpath);
//get_account_info();
return res;
}

//Move and rename funcs, new version
/*
* Move and rename funcs, new version
*/

//predeclaration
int do_api_move_id(int is_dir, const char * id, const char * dest, int is_rename);

int do_api_move(boxpath * bsrc, boxpath * bdst)
{
int res = 0;
Expand Down
2 changes: 2 additions & 0 deletions boxcache.c
Expand Up @@ -4,6 +4,8 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>

static char *cache_dir = NULL;
static time_t expire = 0;
Expand Down
2 changes: 1 addition & 1 deletion boxcache.h
Expand Up @@ -8,4 +8,4 @@ void cache_put(const char * key, const char * val);
void cache_rm(const char * key);

#endif
//BOXCACHE_H
//BOXCACHE_H
2 changes: 1 addition & 1 deletion boxjson.c
Expand Up @@ -127,7 +127,7 @@ void jobj_free(jobj * obj)
{
list_iter it;

if(obj->type = T_VAL) {
if(obj->type == T_VAL) {
free(obj->value);
return;
}
Expand Down
1 change: 1 addition & 0 deletions boxopts.c
Expand Up @@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <fuse.h>
#include <unistd.h>

char* args[] = { "boxfs", "-h" };
/*
Expand Down
2 changes: 1 addition & 1 deletion boxutils.h
Expand Up @@ -17,4 +17,4 @@ off_t filesize(const char * localpath);
char * pathappend(const char * one, const char * two);

#endif
//BOXUTILS_H
//BOXUTILS_H

0 comments on commit 5093220

Please sign in to comment.