Now using 2 spaces instead of tabs. Fix copyright years. Improve documentation
[cgds.git] / src / Makefile
... / ...
CommitLineData
1CC = gcc
2CFLAGS = -g -std=gnu99 -fPIC
3LDFLAGS = -shared
4INCLUDES = -I..
5
6SRC_DIR = ./
7OBJ_DIR = ./obj
8
9TARGET = $(OBJ_DIR)/libcgds.so
10
11SRC_FILES = $(wildcard $(SRC_DIR)/*.c)
12H_FILES = $(wildcard $(SRC_DIR)/*.h)
13OBJ_FILES = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC_FILES))
14
15all: $(TARGET)
16
17$(TARGET): $(OBJ_FILES)
18 $(CC) $(LDFLAGS) -o $@ $^
19
20$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(SRC_DIR)/%.h
21 $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<
22
23clean:
24 rm -f $(OBJ_DIR)/*.o $(TARGET)
25
26.PHONY: all clean