This commit is contained in:
2025-05-21 15:18:00 +02:00
commit ba6eb6c27e
3 changed files with 45 additions and 0 deletions

31
Makefile Normal file
View File

@ -0,0 +1,31 @@
NAME := ft_nmap
CC := gcc
CFLAGS := -Wall -Wextra -Werror -iquoteinclude -g
LD := $(CC)
LDFLAGS :=
SRC := $(shell find src -name '*.c')
OBJ := $(patsubst src/%.c,obj/%.o,$(SRC))
all: $(NAME)
obj/%.o: src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(OBJ)
$(LD) $(LDFLAGS) -o $(NAME) $(OBJ)
clean:
rm -rf obj
fclean: clean
rm -f $(NAME)
re:
$(MAKE) fclean
$(MAKE) all
.PHONY: all clean fclean re