File: Makefile

package info (click to toggle)
cycfx2prog 0.41-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 64 kB
  • ctags: 33
  • sloc: cpp: 805; makefile: 31
file content (31 lines) | stat: -rw-r--r-- 707 bytes parent folder | download
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
CC = gcc -pipe
VERSION = 0.41
CFLAGS = -O2 -fno-rtti -fno-exceptions -DCYCFX2PROG_VERSION=\"$(VERSION)\"
LDFLAGS = -lusb
DIST_DEST = cycfx2prog-$(VERSION)

all: cycfx2prog

# NOTE: Also add sources to the "dist:" target!
cycfx2prog: cycfx2prog.o cycfx2dev.o
	$(CC) $(LDFLAGS) cycfx2prog.o cycfx2dev.o -o cycfx2prog

clean:
	-rm -f *.o

distclean: clean
	-rm -f cycfx2prog

dist:
	mkdir -p "$(DIST_DEST)"
	cp Makefile "$(DIST_DEST)"
	cp cycfx2dev.cc cycfx2dev.h "$(DIST_DEST)"
	cp cycfx2prog.cc "$(DIST_DEST)"
	tar -c "$(DIST_DEST)" | gzip -9 > "cycfx2prog-$(VERSION).tar.gz"
	rm -r "$(DIST_DEST)"

.cc.o:
	$(CC) -c $(CFLAGS) $<

cycfx2dev.o: cycfx2dev.cc cycfx2dev.h
cycfx2prog.o: cycfx2prog.cc cycfx2dev.h