First running version

This commit is contained in:
2018-04-06 17:04:17 +02:00
parent 4b6daded8e
commit ef6408c5a6
10 changed files with 961 additions and 0 deletions

30
Makefile Normal file
View File

@@ -0,0 +1,30 @@
EXE = gclogger
SRC_DIR = src
OBJ_DIR = obj
SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
CPPFLAGS += -Iinclude
CFLAGS += -Wall -Wextra -Os
#LDFLAGS += -Llib
LDLIBS += -lcurl
.PHONY: all clean
all: $(EXE)
# Linking:
$(EXE): $(OBJ)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
# Compiling:
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
# Cleaning:
clean:
$(RM) $(OBJ)
$(RM) $(EXE)