icestorm/icecompr/Makefile

37 lines
751 B
Makefile
Raw Normal View History

2017-02-12 00:50:15 +01:00
include ../config.mk
2017-01-08 13:09:09 +01:00
all: icecompr iceuncompr
test: example_1k.ok example_8k.ok
2017-02-12 00:50:15 +01:00
icecompr: icecompr.o
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
2017-01-08 13:09:09 +01:00
2017-02-12 00:50:15 +01:00
iceuncompr: iceuncompr.o
$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)
2017-01-08 13:09:09 +01:00
%.compr: %.bin icecompr
./icecompr -v $< $@
2017-01-15 10:05:03 +01:00
%.compr_py: %.bin icecompr.py
./icecompr.py < $< > $@
2017-01-08 13:09:09 +01:00
%.uncompr: %.compr iceuncompr
./iceuncompr $< $@
2017-01-15 10:05:03 +01:00
%.ok: %.compr %.compr_py %.uncompr %.bin
cmp $(basename $@).compr $(basename $@).compr_py
cmp $(basename $@).uncompr $(basename $@).bin
2017-01-08 13:09:09 +01:00
touch $@
clean:
rm -f icecompr iceuncompr *.d
2017-01-08 13:09:09 +01:00
rm -f example_1k.compr example_8k.compr
2017-01-15 10:05:03 +01:00
rm -f example_1k.compr_py example_8k.compr_py
2017-01-08 13:09:09 +01:00
rm -f example_1k.uncompr example_8k.uncompr
rm -f example_1k.ok example_8k.ok
.SECONDARY:
.PHONY: all test clean