Skip to content

Commit

Permalink
makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
holabayor committed Aug 17, 2022
1 parent 5e2834a commit 009223a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 0x1C-makefiles/4-Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CC = gcc
CFLAGS = -Wall -Werror -Wextra -pedantic
SRC = main.c school.c
OBJ = $(patsubst %.c,%.o,$(SRC))
NAME = school
RM = rm -f

all : $(OBJ)
$(CC) $(OBJ) -o $(NAME)

%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $^

clean :
$(RM) *~ $(NAME)

oclean :
$(RM) -f $(OBJ)

fclean: clean oclean

re: oclean all

0 comments on commit 009223a

Please sign in to comment.