-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 723 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (23 loc) · 723 Bytes
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
# Compiler and flags
CC = gcc
CFLAGS = -Wall -Werror -g -I/opt/homebrew/Cellar/igraph/0.10.15_1/include/igraph
LDFLAGS = -pthread -L/opt/homebrew/Cellar/igraph/0.10.15_1/lib -ligraph
# Target executable
TARGET = controller
# Source files and headers
SRCS = controller.c checksum.c smartalloc.c topology.c
HDRS = headers/controller.h headers/openflow. headers/checksum.h headers/smartalloc.h headers/uthash.h
# Object files
OBJS = controller.o checksum.o smartalloc.o topology.o
# Default target
all: $(TARGET)
# Link the executable
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS)
# Compile source files
%.o: %.c $(HDRS)
$(CC) $(CFLAGS) -c $< -o $@
# Clean up
clean:
rm -f $(TARGET) *.o
.PHONY: all clean