Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
35 lines (24 loc) · 765 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (24 loc) · 765 Bytes
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
AUTOTARGETS=hdrboot bootunpack
TARGETS=$(AUTOTARGETS) mkbootimg
DEPS = Makefile shared/bootimg.h
COMMON=
PREFIX ?= usr/local
CC=gcc
CFLAGS=-I. -Ishared -Isrc -Wall
LDFLAGS=
OBJS = $(COMMON)$(addsuffix .o, $(TARGETS))
all: $(TARGETS)
$(AUTOTARGETS): %: %.o $(COMMON)$(DEPS)
$(CC)$(CFLAGS) -o $@$<$(COMMON)$(LDFLAGS)
sha.o: src/mincrypt/sha.c src/mincrypt/sha.h
$(CC)$(CFLAGS) -c -o sha.o src/mincrypt/sha.c
mkbootimg: mkbootimg.o sha.o $(COMMON)$(DEPS)
$(CC)$(CFLAGS) -o mkbootimg mkbootimg.o sha.o $(COMMON)$(LDFLAGS)
install: $(TARGETS)
install -d -m 0755 $(DESTDIR)/$(PREFIX)/bin
install -D -m 0755 $(TARGETS)$(DESTDIR)/$(PREFIX)/bin
$(OBJS): %.o: src/%.c $(DEPS)
$(CC) -c -o $@$<$(CFLAGS)
.PHONY: clean
clean:
rm -f $(TARGETS)*.o