2018-04-06 17:18:05 +02:00
|
|
|
# Copyright 2018 Christoph Haas
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the standard MIT license. See LICENSE for more details.
|
|
|
|
|
2018-04-06 17:04:17 +02:00
|
|
|
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)
|