From c4341b2861756e924bf45c71b3880387f345f3bc Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Mon, 3 Sep 2018 13:23:09 -0400 Subject: [PATCH] Add server stages to makefile --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 54a385e..1dbf906 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ LDFLAGS = -lm BUILD_DIR = build COMMON_OBJ_FILES = $(patsubst %.c,$(BUILD_DIR)/%.o,$(wildcard common/*.c)) CLIENT_OBJ_FILES = $(patsubst %.c,$(BUILD_DIR)/%.o,$(wildcard client/*.c)) +SERVER_OBJ_FILES = $(patsubst %.c,$(BUILD_DIR)/%.o,$(wildcard server/*.c)) .PHONY: clean @@ -14,9 +15,15 @@ clean: http_client: $(BUILD_DIR) $(COMMON_OBJ_FILES) $(CLIENT_OBJ_FILES) $(CC) -o $@ $(LDFLAGS) $(filter-out $(BUILD_DIR),$^) +http_server: $(BUILD_DIR) $(COMMON_OBJ_FILES) $(SERVER_OBJ_FILES) + $(CC) -o $@ $(LDFLAGS) $(filter-out $(BUILD_DIR),$^) + $(BUILD_DIR)/%.o: %.c $(CC) $(CFLAGS) -o $@ $< +$(BUILD_DIR)/server: + mkdir -p $(BUILD_DIR)/server + $(BUILD_DIR)/client: mkdir -p $(BUILD_DIR)/client