failure/Makefile

24 lines
505 B
Makefile
Raw Permalink Normal View History

2024-09-30 04:07:45 +01:00
# Define the compiler and flags
CC = gcc
CFLAGS = -Wall -Wextra -std=c99
# Define the target executable and the source files
TARGET = caur
SRCS = $(wildcard src/*.c)
OBJS = $(SRCS:.c=.o)
# The default rule: build the target
all: $(TARGET)
# Link the object files into the target executable
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) -lcurl
# Compile the .c files into .o files
src/%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
# Clean up the build artifacts
clean:
rm -f $(TARGET) $(OBJS)