summaryrefslogtreecommitdiff
path: root/mkubootenv/Makefile
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-03 13:47:24 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-03 13:47:24 +0100
commit0340e79597685b2ffc177283f50e450d2949cff5 (patch)
treed65581dd553bbe736233fd89e0bfadc504388721 /mkubootenv/Makefile
parent9b67de66810c5bff9d69b69d01f96d4d3be12bca (diff)
parentc6e370e4a3a1c574e50240fecefe05965464aefd (diff)
Merge mkubootenv tree into own subdirectory
Diffstat (limited to 'mkubootenv/Makefile')
-rw-r--r--mkubootenv/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/mkubootenv/Makefile b/mkubootenv/Makefile
new file mode 100644
index 0000000..a0cbf46
--- /dev/null
+++ b/mkubootenv/Makefile
@@ -0,0 +1,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)