summaryrefslogtreecommitdiff
path: root/mkubootenv/Makefile
blob: a0cbf46c80121dd2a4132b3d879a88ac1591530d (plain)
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
prefix = $(HOME)

P	 = mkubootenv
OBJS	 = mkubootenv.o crc32.o
WHERE	 = $(prefix)/bin/$(P)

CFLAGS	+= -W -Wall -Wextra -Wstrict-prototypes -Wsign-compare -Wshadow \
	   -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
	   -Wpointer-arith -Wcast-align

all: $(P)

$(P): $(OBJS)
	@echo "  LD $@"
	@$(CC) $(LDFLAGS) -o $@ $^

%.o: %.c %.h
	@echo "  CC $@"
	@$(CC) $(CFLAGS) -c $< -o $@

%.o: %.c
	@echo "  CC $@"
	@$(CC) $(CFLAGS) -c $< -o $@

install:
	@echo "  INSTALL $(WHERE)"
	@install -m755 -D $(P) $(WHERE)

uninstall:
	@echo "  UNINSTALL $(WHERE)"
	@rm -f $(WHERE)

clean:
	@echo "  CLEAN"
	@rm -f $(OBJS) $(P)