diff options
author | joe <rbousset@42lyon.fr> | 2020-11-25 12:40:08 +0100 |
---|---|---|
committer | joe <rbousset@42lyon.fr> | 2020-11-25 12:40:08 +0100 |
commit | c215e751527ba78fe5934fc10fd4baea104988de (patch) | |
tree | cabebe37e17469498be24768ef1fdb172c5ab144 | |
parent | gitignore update (diff) | |
download | 42-minishell-c215e751527ba78fe5934fc10fd4baea104988de.tar.gz 42-minishell-c215e751527ba78fe5934fc10fd4baea104988de.tar.bz2 42-minishell-c215e751527ba78fe5934fc10fd4baea104988de.tar.xz 42-minishell-c215e751527ba78fe5934fc10fd4baea104988de.tar.zst 42-minishell-c215e751527ba78fe5934fc10fd4baea104988de.zip |
less retarded Makefile
-rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -117,13 +117,13 @@ LFT_SRCS = $(shell find ${LFT_SRCS_DIR} -name "*.c") #-------------------------------- COMPILER ------------------------------------# #==============================================================================# ifeq (${OS}, FreeBSD) -CC = /usr/bin/cc +CC = cc endif ifeq (${OS}, Linux) CC = clang endif ifeq (${OS}, Darwin) -CC = clang +CC = cc endif CFLAGS = -std=c89 CFLAGS += -Wall @@ -146,15 +146,17 @@ MKDIR = mkdir -p #==============================================================================# LFTRULE = all #------------------------------------------------------------------------------# -${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS} - @${MKDIR} ${OBJS_DIR} +${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS} ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_INCS_DIR} -o $@ $< #------------------------------------------------------------------------------# -$(NAME): ${OBJS} ${LFT_SRCS} ${LFT_INCS_DIR}libft.h +${OBJS_DIR}: + ${MKDIR} ${OBJS_DIR} +#------------------------------------------------------------------------------# +$(NAME): ${OBJS} ${LFT_SRCS} ${LFT_INCS_DIR}libft.h @$(MAKE) --no-print-directory -C ${LFT_DIR} ${LFTRULE} ${CC} ${CFLAGS} ${CDEFS} -o ${NAME} ${OBJS} ${LDFLAGS} #------------------------------------------------------------------------------# -all: ${NAME} +all: ${OBJS_DIR} ${NAME} #------------------------------------------------------------------------------# debug: CFLAGS += -glldb debug: LFTRULE = debug |