add makefile and start of project

This commit is contained in:
2025-04-23 16:45:33 +02:00
commit c508059e5f
4 changed files with 44 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.objs
ft_ping

29
Makefile Normal file
View File

@ -0,0 +1,29 @@
NAME = ft_ping
CC=cc
FLAGS=-Werror -Wextra -Wall
SRCS_DIR = srcs
OBJS_DIR = .objs
SRCS = ft_ping.c
OBJS = $(addprefix $(OBJS_DIR)/,$(SRCS:.c=.o))
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(FLAGS) $< -o $@
$(OBJS_DIR):
mkdir $(OBJS_DIR)
$(OBJS_DIR)/%.o: $(SRCS_DIR)/%.c $(OBJS_DIR)
$(CC) $(FLAGS) -c $< -o $@
clean:
rm -rf $(OBJS_DIR)
fclean: clean
rm $(NAME)
.PHONY: clean fclean

7
srcs/ft_ping.c Normal file
View File

@ -0,0 +1,7 @@
#include "includes/ft_ping.h"
int main(void)
{
printf("AAAAAAAAAAAAAAAAAAA");
return(0);
}

6
srcs/includes/ft_ping.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef FT_PING_H
# define FT_PING_H
#include <stdio.h>
#endif