added semaphore and shared memory to print without superposition between parent and child process
This commit is contained in:
12
Makefile
12
Makefile
@@ -1,13 +1,13 @@
|
||||
|
||||
NAME = webserv
|
||||
CXX = c++
|
||||
CXX = clang++
|
||||
|
||||
CXXFLAGS = -Wall -Wextra -Werror
|
||||
CXXFLAGS += $(HEADERS_D:%=-I%)
|
||||
CXXFLAGS += -std=c++98
|
||||
CXXFLAGS += -g
|
||||
#CXXFLAGS += -fno-limit-debug-info
|
||||
CXXFLAGS += -MMD -MP #header dependencie
|
||||
CXXFLAGS += -MMD -MP # header dependencie
|
||||
# for debug
|
||||
|
||||
VPATH = $(SRCS_D)
|
||||
|
||||
@@ -43,14 +43,16 @@ DEPS = $(OBJS:.o=.d) #header dependencie
|
||||
all: $(NAME)
|
||||
|
||||
$(OBJS_D)/%.o: %.cpp | $(OBJS_D)
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
$(CXX) -c $< -o $@ $(CXXFLAGS)
|
||||
printf "$(_CYAN)\r\33[2K\rCompling $@$(_END)"
|
||||
|
||||
$(OBJS_D):
|
||||
mkdir $@
|
||||
|
||||
$(NAME): $(OBJS)
|
||||
$(CXX) $^ -o $(NAME)
|
||||
# $(CXX) $^ -o $(NAME)
|
||||
# add -lpthread for semaphore library
|
||||
$(CXX) $^ -o $(NAME) -lpthread
|
||||
echo "$(_GREEN)\r\33[2K\r$(NAME) created 😎$(_END)"
|
||||
|
||||
# CGI
|
||||
|
||||
Reference in New Issue
Block a user