Some fixes + improvements (Vector) + code reformatting
[cgds.git] / src / Makefile
CommitLineData
aef8a996
BA
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)
aef8a996
BA
12OBJ_FILES = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC_FILES))
13
14all: $(TARGET)
15
16$(TARGET): $(OBJ_FILES)
17 $(CC) $(LDFLAGS) -o $@ $^
18
19$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(SRC_DIR)/%.h
20 $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<
21
22clean:
23 rm -f $(OBJ_DIR)/*.o $(TARGET)
24
25.PHONY: all clean