From da6e40fe3eee692e68671d8dbdb12402a6cd887c Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 1 Jun 2022 17:40:52 +0200 Subject: [PATCH] divided install rule into more rules I also fixed calling rules from rules lol --- Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 6e37165..991bc03 100644 --- a/Makefile +++ b/Makefile @@ -26,19 +26,15 @@ DOLLAR=$ ########## -all: install - -install: -# Install WHY2-Lib +installLib: for file in $(INCLUDE); do install -m 755 -D $(DOLLAR)file -t $(INSTALL_INCLUDE)/$(PROJECT_NAME); done install -m 755 $(INCLUDE_DIR)/$(PROJECT_NAME).h $(INSTALL_INCLUDE)/$(PROJECT_NAME).h $(CC) $(CFLAGS) -fPIC -c $(SRC) $(CC) $(CFLAGS) -shared -o lib$(PROJECT_NAME).so *.o $(LIBS) install -m 755 lib$(PROJECT_NAME).so $(INSTALL_LIBRARY)/lib$(PROJECT_NAME).so -# Install WHY2-App - make app + +installApp: app install -m 755 $(OUTPUT_APP) $(INSTALL_BIN)/$(PROJECT_NAME) - make clean test: $(CC) $(CFLAGS) $(TEST) -o $(OUTPUT_TEST) -l$(PROJECT_NAME) @@ -49,5 +45,6 @@ app: clean: rm -rf $(OUTPUT)/* *.o *.so - -installTest: install test \ No newline at end of file +all: install +installTest: install test +install: installLib installApp clean \ No newline at end of file