-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (26 loc) · 1.02 KB
/
makefile
File metadata and controls
38 lines (26 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
CC = gcc
CFLAGS = -Iinclude -Wall -Wextra -g
# Output directory
BUILD_DIR = build
# Output binaries
SERVER = $(BUILD_DIR)/ser
METASERVER = $(BUILD_DIR)/metaser
CLIENT = $(BUILD_DIR)/cli
# Source files (actual paths in the repo)
SERVER_SRC = src/sever.c src/dataserver_res/heatbeat.c src/clint_res/connction_cash.c
METASERVER_SRC = src/metadata_server.c
METADATA_SRC = src/metadata_res/load_metadata.c src/metadata_res/getlocation.c src/metadata_res/writeblock.c src/clint_res/connction_cash.c
CLIENT_SRC = src/client.c src/clint_res/connction_cash.c src/clint_res/lookup.c src/clint_res/wirtefuncs.c src/clint_res/read_file.c
# Default target
all: $(BUILD_DIR) $(SERVER) $(METASERVER) $(CLIENT)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(SERVER): $(SERVER_SRC)
$(CC) $(CFLAGS) $(SERVER_SRC) -o $(SERVER)
$(METASERVER): $(METASERVER_SRC) $(METADATA_SRC)
$(CC) $(CFLAGS) $(METASERVER_SRC) $(METADATA_SRC) -o $(METASERVER)
$(CLIENT): $(CLIENT_SRC)
$(CC) $(CFLAGS) $(CLIENT_SRC) -o $(CLIENT)
clean:
rm -rf $(BUILD_DIR)
.PHONY: all clean