Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 5s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 9s
21 lines
410 B
Makefile
21 lines
410 B
Makefile
CC = gcc
|
|
CFLAGS = -Wall -g -std=gnu2x
|
|
LDFLAGS =
|
|
LIBS =
|
|
INCLUDES = -I./src/lib -I./src
|
|
SRCS = $(wildcard src/*.c src/lib/*.c)
|
|
OBJS = $(SRCS:.c=.o)
|
|
TARGET = sudo
|
|
CROSS_COMPILE =
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CROSS_COMPILE)$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
|
|
|
|
%.o: %.c
|
|
$(CROSS_COMPILE)$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET) $(shell find . -type f -name '*.log') users.db
|