ajout explications
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
SRC = main.c putchar.c transform.c
|
||||
DEP = test.h
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
test: $(OBJ)
|
||||
gcc -I. -o test $(OBJ)
|
||||
%.o: %.c $(DEP)
|
||||
gcc -I. -c $<
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
#include "test.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int a = 't';
|
||||
a = transform(a);
|
||||
ft_putchar(a);
|
||||
return (0);
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
#include "test.h"
|
||||
|
||||
void ft_putchar(char c)
|
||||
{
|
||||
write(1, &c, 1);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
# ifndef TEST_H
|
||||
# define TEST_H
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_putchar(char c);
|
||||
int transform(int a);
|
||||
|
||||
# endif
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "test.h"
|
||||
|
||||
int transform(int a)
|
||||
{
|
||||
return(--a);
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user