blob: 4aad2464a1be29e401358c888f04fdc1c9ac3b45 [file] [log] [blame] [raw]
# -----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Lukas Niederbremer <webmaster@flippeh.de> and Clark Gaebel <cg.wowus.cg@gmail.com>
# wrote this file. As long as you retain this notice you can do whatever you
# want with this stuff. If we meet some day, and you think this stuff is worth
# it, you can buy us a beer in return.
# -----------------------------------------------------------------------------
CFLAGS += -g -Wall -Wextra -Wno-unused-parameter -Wno-switch
all: nbtreader check
nbtreader: main.o libnbt.a
$(CC) $(LDFLAGS) main.o -L. -lnbt -lz -o $@
check: check.c libnbt.a
$(CC) $(CFLAGS) $(LDFLAGS) check.c -L. -lnbt -lz -o $@
regioninfo: regioninfo.c libnbt.a
$(CC) $(CFLAGS) $(LDFLAGS) regioninfo.c -L. -lnbt -lz -o $@
mount.nbt: mount.nbt.c libnbt.a
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -L . -l nbt -l z -l fuse
test: check
cd testdata && for f in *.nbt; do valgrind ../check "$$f" || exit; done
main.o: main.c
libnbt.a: buffer.o nbt_loading.o nbt_parsing.o nbt_treeops.o nbt_util.o
ar -rcs $@ buffer.o nbt_loading.o nbt_parsing.o nbt_treeops.o nbt_util.o
buffer.o: buffer.c
nbt_loading.o: nbt_loading.c
nbt_parsing.o: nbt_parsing.c
nbt_treeops.o: nbt_treeops.c
nbt_util.o: nbt_util.c
clean:
rm -f nbtreader check regioninfo mount.nbt libnbt.a main.o buffer.o nbt_loading.o nbt_parsing.o nbt_treeops.o nbt_util.o