mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 05:17:59 +03:00
init
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
webserv
|
||||||
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
NAME = webserv
|
||||||
|
|
||||||
|
CXX = clang++
|
||||||
|
|
||||||
|
SANFLAGS = -fsanitize=address
|
||||||
|
# SANFLAGS = -fsanitize=leak
|
||||||
|
|
||||||
|
CXXFLAGS = -Wall -Wextra -Werror -g -std=c++98 $(SANFLAGS)
|
||||||
|
|
||||||
|
SRC = $(wildcard ./src/*.cpp)
|
||||||
|
|
||||||
|
HEADERS = $(wildcard ./includes/*.hpp)
|
||||||
|
|
||||||
|
INCLUDES = .
|
||||||
|
|
||||||
|
OBJ = $(SRC:.cpp=.o)
|
||||||
|
|
||||||
|
all: $(NAME)
|
||||||
|
|
||||||
|
$(OBJ): %.o: %.cpp $(SRC) $(HEADERS) Makefile
|
||||||
|
$(CXX) $(CXXFLAGS) -c $< -I $(INCLUDES) -o $@
|
||||||
|
|
||||||
|
$(NAME): $(OBJ) $(HEADERS)
|
||||||
|
$(CXX) $(CXXFLAGS) $(OBJ) -o $(NAME)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) $(OBJ)
|
||||||
|
|
||||||
|
fclean: clean
|
||||||
|
$(RM) $(NAME)
|
||||||
|
|
||||||
|
re:
|
||||||
|
$(MAKE) fclean
|
||||||
|
$(MAKE) all
|
||||||
|
|
||||||
|
run: $(NAME)
|
||||||
|
./$(NAME)
|
||||||
|
|
||||||
|
.PHONY: all clean fclean re
|
||||||
8
src/main.cpp
Normal file
8
src/main.cpp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
std::cout << "jopa" << std::endl;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user