summaryrefslogtreecommitdiff
path: root/Makefile
blob: 60553b254bedb0480a110abc117bfdcd3322bb96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: pgfuse

# for debugging
CFLAGS = -Wall -g -O0
# for releasing
#CFLAGS = -Wall -O2

# declare version of FUSE API we want to program against
CFLAGS += -DFUSE_USE_VERSION=26

# use pkg-config to detemine compiler/linker flags for libfuse
CFLAGS += `pkg-config fuse --cflags`
LDFLAGS = `pkg-config fuse --libs` -lpq

clean:
	rm -f pgfuse pgfuse.o

test: pgfuse
	psql < test.sql
	-./pgfuse -v "" mnt
	mount | grep pgfuse
	-mkdir mnt/dir
	-mkdir mnt/dir/dir2
	-ls -al mnt
	fusermount -u mnt
	
pgfuse: pgfuse.o
	gcc -o pgfuse $(LDFLAGS) pgfuse.o

pgfuse.o: pgfuse.c
	gcc -c $(CFLAGS) -o pgfuse.o pgfuse.c