Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 8d9870b66c3cfcf12ce7e8e013946e2a215bb722 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ankit Navik <ankit.tarot@gmail.com> |
| 3 | Date: Sat, 22 Dec 2018 19:16:02 +0530 |
| 4 | Subject: [PATCH] Add install PHONY target in Makefile |
| 5 | |
| 6 | --- |
| 7 | Makefile | 8 +++++++- |
| 8 | 1 file changed, 7 insertions(+), 1 deletion(-) |
| 9 | |
| 10 | diff --git a/Makefile b/Makefile |
| 11 | index 0564b65..0993372 100644 |
| 12 | --- a/Makefile |
| 13 | +++ b/Makefile |
| 14 | @@ -35,7 +35,13 @@ $(STATIC_LIB): $(OBJECTS) |
| 15 | %.o: %.cpp |
| 16 | $(CXX) -c -o $@ $< $(CXXFLAGS) -MMD |
| 17 | |
| 18 | +install: |
| 19 | + mkdir -p $(TARGET_DIR_BIN) |
| 20 | + mkdir -p $(TARGET_DIR_LIB) |
| 21 | + cp $(TARGET) $(TARGET_DIR_BIN)/ |
| 22 | + cp $(STATIC_LIB) $(TARGET_DIR_LIB)/ |
| 23 | + |
| 24 | clean: |
| 25 | rm -f $(TARGET) $(OBJECTS) $(CLI_OBJECTS) $(STATIC_LIB) $(DEPS) |
| 26 | |
| 27 | -.PHONY: clean |
| 28 | +.PHONY: all install clean |
| 29 | -- |
| 30 | 2.7.4 |
| 31 | |