Merge 50aeed0b53
into 227e8de979
This commit is contained in:
commit
28d51f3b4d
2 changed files with 25 additions and 4 deletions
21
Makefile
21
Makefile
|
@ -1,4 +1,19 @@
|
||||||
CFLAGS=`pkg-config --libs --cflags zlib`
|
|
||||||
|
|
||||||
unpack: unpack.c
|
CFLAGS += $(shell pkg-config --libs --cflags zlib)
|
||||||
gcc -Wall $(CFLAGS) -o unpack unpack.c
|
CFLAGS += -Wall
|
||||||
|
|
||||||
|
ifndef CC
|
||||||
|
CC = gcc
|
||||||
|
endif
|
||||||
|
|
||||||
|
APP = unpack
|
||||||
|
TMP_FILES = $(wildcard *~)
|
||||||
|
|
||||||
|
all: $(APP)
|
||||||
|
|
||||||
|
%: %.c
|
||||||
|
$(CC) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(APP) $(TMP_FILES)
|
||||||
|
|
||||||
|
|
8
thing.rb
8
thing.rb
|
@ -298,7 +298,13 @@ if $0 == __FILE__
|
||||||
file.write(parent.to_json)
|
file.write(parent.to_json)
|
||||||
|
|
||||||
end
|
end
|
||||||
puts "Wrote:\n [%d] %s\n [%d] %s" % [File.size(txt_name), txt_name, File.size(json_name), json_name]
|
|
||||||
|
binary.flush # the bits need to be written before showing the size of the file
|
||||||
|
|
||||||
|
puts "Wrote:"
|
||||||
|
[txt_name, json_name, binary.path].each do |filename|
|
||||||
|
puts " [%d] %s" % [File.size(filename), filename]
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue