diff options
Diffstat (limited to '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 |