add makefile and start of project
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.objs
|
||||
ft_ping
|
29
Makefile
Normal file
29
Makefile
Normal 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
7
srcs/ft_ping.c
Normal 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
6
srcs/includes/ft_ping.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef FT_PING_H
|
||||
# define FT_PING_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user