modificato makefile per aggiungere client

This commit is contained in:
Lorenzo Bianchi 2023-05-15 10:57:12 +02:00
parent 0c867e8082
commit 23b62a2eef
2 changed files with 10 additions and 5 deletions

View File

@ -16,7 +16,8 @@ BIN_DIR := bin
CXX := gcc
WFLAGS := -Wall
OFLAG := -o
TARGET := $(BIN_DIR)/main
TARGET1 := $(BIN_DIR)/F4Server
TARGET2 := $(BIN_DIR)/F4Client
INCLUDE := -I $(INC_DIR)
@ -32,14 +33,18 @@ OBJS := $(addprefix $(OBJ_DIR)/,$(addsuffix .o,$(FILES)))
#---------------------------------------------------
all: execute
#---------------------------------------------------
execute: linking
execute: linking_s linking_c
@ echo execute...
@ ./$(TARGET)
@ ./$(TARGET1)
@ echo ...terminate
#---------------------------------------------------
linking: $(OBJS) $(BIN_DIR)
linking_s: $(OBJS) $(BIN_DIR)
@ echo linking
@ $(CXX) $(WFLAGS) $(OFLAG) $(TARGET) $(OBJS)
@ $(CXX) $(WFLAGS) $(OFLAG) $(TARGET1) $(OBJS)
#---------------------------------------------------
linking_c: $(OBJS) $(BIN_DIR)
@ echo linking
@ $(CXX) $(WFLAGS) $(OFLAG) $(TARGET2) $(OBJS)
#---------------------------------------------------
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(OBJ_DIR)
@ echo compile $<

BIN
main

Binary file not shown.