divided install rule into more rules

I also fixed calling rules from rules lol
This commit is contained in:
Václav Šmejkal 2022-06-01 17:40:52 +02:00
parent 9120f2638b
commit da6e40fe3e
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -26,19 +26,15 @@ DOLLAR=$
########## ##########
all: install installLib:
install:
# Install WHY2-Lib
for file in $(INCLUDE); do install -m 755 -D $(DOLLAR)file -t $(INSTALL_INCLUDE)/$(PROJECT_NAME); done 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 install -m 755 $(INCLUDE_DIR)/$(PROJECT_NAME).h $(INSTALL_INCLUDE)/$(PROJECT_NAME).h
$(CC) $(CFLAGS) -fPIC -c $(SRC) $(CC) $(CFLAGS) -fPIC -c $(SRC)
$(CC) $(CFLAGS) -shared -o lib$(PROJECT_NAME).so *.o $(LIBS) $(CC) $(CFLAGS) -shared -o lib$(PROJECT_NAME).so *.o $(LIBS)
install -m 755 lib$(PROJECT_NAME).so $(INSTALL_LIBRARY)/lib$(PROJECT_NAME).so 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) install -m 755 $(OUTPUT_APP) $(INSTALL_BIN)/$(PROJECT_NAME)
make clean
test: test:
$(CC) $(CFLAGS) $(TEST) -o $(OUTPUT_TEST) -l$(PROJECT_NAME) $(CC) $(CFLAGS) $(TEST) -o $(OUTPUT_TEST) -l$(PROJECT_NAME)
@ -49,5 +45,6 @@ app:
clean: clean:
rm -rf $(OUTPUT)/* *.o *.so rm -rf $(OUTPUT)/* *.o *.so
all: install
installTest: install test installTest: install test
install: installLib installApp clean