Fixed .gitignore
This commit is contained in:
12
.gitignore
vendored
12
.gitignore
vendored
@ -2,6 +2,17 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.dumbjump
|
.dumbjump
|
||||||
|
|
||||||
|
# project specific
|
||||||
|
build/*
|
||||||
|
!build/.gitkeep
|
||||||
|
|
||||||
|
logs/*
|
||||||
|
!logs/.gitkeep
|
||||||
|
|
||||||
|
obj/*
|
||||||
|
!obj/.gitkeep
|
||||||
|
|
||||||
|
|
||||||
# ---> C
|
# ---> C
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
*.d
|
*.d
|
||||||
@ -62,7 +73,6 @@ CMakeCache.txt
|
|||||||
CMakeFiles
|
CMakeFiles
|
||||||
CMakeScripts
|
CMakeScripts
|
||||||
Testing
|
Testing
|
||||||
Makefile
|
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|||||||
52
Makefile
Normal file
52
Makefile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
CC = gcc
|
||||||
|
AR = ar
|
||||||
|
CFLAGS += -std=c99 -Wall -Werror -pedantic -g
|
||||||
|
ARFLAGS = rvs
|
||||||
|
INCDIR = ./lib/utils -I ./lib/ini -I ./lib/threadpool -I ./src
|
||||||
|
INCLUDES = -I . -I $(INCDIR)
|
||||||
|
LDFLAGS = -L .
|
||||||
|
OPTFLAGS = #-O3
|
||||||
|
LIBS = -lpthread
|
||||||
|
SOCKET = ./cs_sock
|
||||||
|
|
||||||
|
BUILD_DIR = ./build
|
||||||
|
SRC_DIR = ./src
|
||||||
|
OBJ_DIR = ./obj
|
||||||
|
|
||||||
|
OBJ_SERVER = obj/threadpool.o obj/ini.o obj/serverWorker.o obj/server.o
|
||||||
|
|
||||||
|
.DEFAULT_GOAL = server
|
||||||
|
|
||||||
|
# aggiungere qui altri targets
|
||||||
|
TARGETS = server
|
||||||
|
|
||||||
|
.PHONY: all clean cleanall
|
||||||
|
.SUFFIXES: .c .h
|
||||||
|
|
||||||
|
obj/threadpool.o: lib/threadpool/threadpool.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDES) -c lib/threadpool/threadpool.c
|
||||||
|
@mv threadpool.o $(OBJ_DIR)/threadpool.o
|
||||||
|
|
||||||
|
obj/ini.o: lib/ini/ini.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDES) -c lib/ini/ini.c
|
||||||
|
@mv ini.o $(OBJ_DIR)/ini.o
|
||||||
|
|
||||||
|
obj/serverWorker.o: src/serverWorker.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDES) -c src/serverWorker.c
|
||||||
|
@mv serverWorker.o $(OBJ_DIR)/serverWorker.o
|
||||||
|
|
||||||
|
obj/server.o: src/server.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDES) -c src/server.c
|
||||||
|
@mv server.o $(OBJ_DIR)/server.o
|
||||||
|
|
||||||
|
server: $(OBJ_SERVER)
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) $(OBJ_SERVER) -o $(BUILD_DIR)/server
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
clean :
|
||||||
|
@rm -rf $(BUILD_DIR)/* logs/*.log
|
||||||
|
|
||||||
|
cleanall : clean
|
||||||
|
@rm -rf $(OBJ_DIR)/*
|
||||||
|
@rm -f $(SOCKET)
|
||||||
0
build/.gitkeep
Normal file
0
build/.gitkeep
Normal file
0
logs/.gitkeep
Normal file
0
logs/.gitkeep
Normal file
0
obj/.gitkeep
Normal file
0
obj/.gitkeep
Normal file
Reference in New Issue
Block a user