-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 1.1 KB
/
Makefile
File metadata and controls
35 lines (26 loc) · 1.1 KB
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
all: greenpak-programmer
PACKAGE = greenpak-programmer
VERSION = 1.2
LDLIBS = -li2c
CFLAGS = -Og -g
$(PACKAGE): $(PACKAGE).c
$(CROSS_COMPILE)$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
clean:
rm -f $(PACKAGE) *.o *~ *.bak
install: $(PACKAGE)
install -d $(DESTDIR)/bin
install $(PACKAGE) $(DESTDIR)/bin/$(PACKAGE)
uninstall:
$(RM) -f $(DESTDIR)/bin/$(PACKAGE)
dist:
@git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ v$(VERSION) | gzip >../$(PACKAGE)-$(VERSION).tar.gz
@(cd .. && md5sum $(PACKAGE)-$(VERSION).tar.gz > $(PACKAGE)-$(VERSION).tar.gz.md5)
@(cd .. && sha256sum $(PACKAGE)-$(VERSION).tar.gz > $(PACKAGE)-$(VERSION).tar.gz.sha256)
release: dist
@echo "Resulting release files in parent dir:"
@echo "=================================================================================================="
@for file in $(PACKAGE)-$(VERSION).tar.gz; do \
printf "%-33s Distribution tarball\n" $$file; \
printf "%-33s " $$file.md5; cat ../$$file.md5 | cut -f1 -d' '; \
printf "%-33s " $$file.sha256; cat ../$$file.sha256 | cut -f1 -d' '; \
done