diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-02-15 00:36:04 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-15 00:36:04 +0100 |
| commit | 6a1e91750ee43fccb6160af0f44139698c8dfdc3 (patch) | |
| tree | 70a9bc690134362459c5617b0213e2822d68ed51 /philo_two/Makefile | |
| parent | f6a960c09c9593af72ff6da2c3ed501e01a0f429 (diff) | |
| download | philosophers-6a1e91750ee43fccb6160af0f44139698c8dfdc3.tar.gz philosophers-6a1e91750ee43fccb6160af0f44139698c8dfdc3.tar.bz2 philosophers-6a1e91750ee43fccb6160af0f44139698c8dfdc3.zip | |
philo_two working (again with the hack?)
Diffstat (limited to 'philo_two/Makefile')
| -rw-r--r-- | philo_two/Makefile | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/philo_two/Makefile b/philo_two/Makefile index 8845406..53c06f4 100644 --- a/philo_two/Makefile +++ b/philo_two/Makefile @@ -6,33 +6,44 @@ # By: cacharle <marvin@42.fr> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/11/24 05:50:15 by cacharle #+# #+# # -# Updated: 2019/11/24 07:07:05 by cacharle ### ########.fr # +# Updated: 2020/02/14 23:37:39 by cacharle ### ########.fr # # # # **************************************************************************** # RM = rm -f +COMMON_DIR = ../common + CC = gcc -CCFLAGS = -Wall -Wextra #-Werror -LDFLAGS = -lpthread +CCFLAGS = -I$(COMMON_DIR) -Wall -Wextra #-Werror +LDFLAGS = -lpthread -L$(COMMON_DIR) -lphilocommon NAME = philo_two -SRC = main.c -OBJ = $(SRC:.c=.o) +SRC = main.c \ + io.c \ + routine.c + +OBJ = $(SRC:.c=.o) all: $(NAME) -$(NAME): $(OBJ) +$(NAME): common_all $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) %.o: %.c - $(CC) $(CCFLAGS) -c -o $@ $^ + $(CC) $(CCFLAGS) -c -o $@ $< -clean: +clean: common_fclean $(RM) $(OBJ) fclean: clean $(RM) $(NAME) re: fclean all + +common_all: + make -C $(COMMON_DIR) all + +common_fclean: + make -C $(COMMON_DIR) fclean |
