Compare commits
2 Commits
d49dac1669
...
2fa5d60e6e
Author | SHA1 | Date | |
---|---|---|---|
|
2fa5d60e6e | ||
|
894b32fe2f |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
build
|
||||
*.swp
|
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
#location of test mains
|
||||
OFFSHORE_MAINS := .
|
||||
# location of project directories
|
||||
OFFSHORE_PROJECTS := ..
|
||||
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
CFLAGS_MANDATORY := -Wall -Wextra -Werror
|
||||
all: $(foreach e, 00 01 02 03 04 05 06 07 08, build/c00/ex$e)
|
||||
build:
|
||||
mkdir $@
|
||||
norme:
|
||||
norminette -R CheckForbiddenSourceHeader ../c$(subst _,$(space),)
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
.SECONDEXPANSION:
|
||||
build/c%: $(OFFSHORE_PROJECTS)/c$$(subst _,+,$$*)/*.c $$(OFFSHORE_MAINS)/c$$*.c
|
||||
mkdir -p $(@D)
|
||||
$(CC) -o $@ $(CFLAGS_MANDATORY) $(CFLAGS) $^
|
||||
|
||||
.PHONY: all norme clean
|
@ -1,8 +1,11 @@
|
||||
void ft_putnbr(int);
|
||||
void ft_putchar(char);
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
int main(void)
|
||||
{
|
||||
ft_putnbr(0xEFFFFFFF);
|
||||
printf("%d = \n", INT_MIN);
|
||||
ft_putnbr(INT_MIN);
|
||||
ft_putchar('\n');
|
||||
ft_putnbr(-7141);
|
||||
ft_putchar('\n');
|
||||
@ -20,6 +23,6 @@ int main(void)
|
||||
ft_putchar('\n');
|
||||
ft_putnbr(0xBADF00D);
|
||||
ft_putchar('\n');
|
||||
ft_putnbr(0x7FFFFFFF);
|
||||
ft_putnbr(INT_MAX);
|
||||
ft_putchar('\n');
|
||||
}
|
Loading…
Reference in New Issue
Block a user