<file_sep>
#include <libftprintf.h>

#include <stdio.h>

//int		main(int ac, char **av)
int		main(void)
{
	char		*str1 = "bonjour les amis ravis de vous revoir";
	int			str3 = 1234;
	int			ret;

	ret = ft_printf("");
	ft_putnbr(ret);
	ft_putchar('\n');
	ret = ft_printf("");
	ft_putnbr(ret);
//	ft_putchar('\n');
//	setlocale(LC_ALL, "");
//	printf("😆 😎 😵 😗 😈\n");
}
<file_sep>#ifndef LIBFTPRINTF_H
#define LIBFTPRINTF_H
#include <unistd.h>
#include <libft.h>
#include <stdarg.h>
/*
typedef struct			s_ft_printf_flags;
{
	int			minus;
	int			plus;
	int			zero;
	int			dies;
	int			escape;
}						t_ft_printf_flags;

typedef struct			s_ft_printf_special_conversion;
{
	int			h;
	int			hh;
	int			l;
	int			ll;
	int			j;
	int			z;
}						t_ft_printf_special_conversion;

typedef struct			s_ft_printf_conversion;
{
	int			c;
	int			C;
	int			d;
	int			D;
	int			i;
	int			o;
	int			O;
	int			p;
	int			s;
	int			S;
	int			u;
	int			U;
	int			x;
	int			X;
}						t_ft_printf_conversion;

typedef struct			s_ft_printf_precision;
{
	int			precision;
}						t_ft_printf_precision;
*/
int						ft_printf(char *premier, ...);
#endif
<file_sep># **************************************************************************** #
#                                                                              #
#                                                         :::      ::::::::    #
#    Makefile                                           :+:      :+:    :+:    #
#                                                     +:+ +:+         +:+      #
#    By: lgatibel <<EMAIL>>                    +#+  +:+       +#+         #
#                                                 +#+#+#+#+#+   +#+            #
#    Created: 2016/02/10 10:00:24 by lgatibel          #+#    #+#              #
#    Updated: 2016/09/16 13:42:49 by lgatibel         ###   ########.fr        #
#                                                                              #
# **************************************************************************** #

NAME = ft_printf

SRC_NAME = main.c ft_printf.c

OBJ_NAME = $(SRC_NAME:.c=.o)

SRC_PATH = ./srcs/

OBJ_PATH = ./objs/

SRC = $(addprefix $(SRC_PATH),$(SRC_NAME))

OBJ = $(addprefix $(OBJ_PATH),$(OBJ_NAME))

INC = -I./headers/

INC_LIBFT = -I./Libft/includes/

LIBFT_PATH = ./Libft/

LIBFT = -L./$(LIBFT_PATH)/ -lft

CC = clang

CFLAGS = -Wall -Wextra -Werror

all: $(NAME)

$(NAME): $(OBJ)
	@echo "\nlibft"
	@make -C Libft
	$(CC)  $(OBJ) $(INC) $(INC_LIBFT) $(LIBFT) -o $(NAME)
	@echo "\n"
#ne pas ooublier les flags

$(addprefix $(OBJ_PATH),%.o) : $(addprefix $(SRC_PATH),%.c)
	@mkdir -p $(OBJ_PATH) 2> /dev/null
	@$(CC) -c $< $(INC) $(INC_LIBFT) -o $@
	echo "!!!!!!!!!!!!!!!!!!!!!!!!ne pas ooublier les flags"

$(LIB):
	make -C $(LIBFT_PATH)

clean:
	rm -rf $(OBJ_PATH)

fclean: clean
	rm $(NAME)

re: fclean all

r: fclean $(OBJ)
	$(CC)  $(OBJ) $(INC) $(INC_LIBFT) $(LIBFT) -o $(NAME)

norme:
	norminette $(SRC)
	norminette $(INC_PATH)
