File: Makefile

package info (click to toggle)
fpga-icestorm 0~20250207git7fbf8c0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,440 kB
  • sloc: python: 28,401; cpp: 4,970; sh: 2,594; ansic: 1,206; makefile: 697; xml: 16
file content (36 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
include ../config.mk

all: icecompr iceuncompr

test: example_1k.ok example_8k.ok

icecompr: icecompr.o
	$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)

iceuncompr: iceuncompr.o
	$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)

%.compr: %.bin icecompr
	./icecompr -v $< $@

%.compr_py: %.bin icecompr.py
	./icecompr.py < $< > $@

%.uncompr: %.compr iceuncompr
	./iceuncompr $< $@

%.ok: %.compr %.compr_py %.uncompr %.bin
	cmp $(basename $@).compr $(basename $@).compr_py
	cmp $(basename $@).uncompr $(basename $@).bin
	touch $@

clean:
	rm -f icecompr iceuncompr *.d
	rm -f example_1k.compr example_8k.compr
	rm -f example_1k.compr_py example_8k.compr_py
	rm -f example_1k.uncompr example_8k.uncompr
	rm -f example_1k.ok example_8k.ok

.SECONDARY:
.PHONY: all test clean