c3a67abb18f0f259cfe002e040b01a9eab8c5724
[cgds.git] / test / Makefile
1 CC = gcc
2 CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration
3 LDFLAGS = -L../src/obj -lcgds -Wl,-rpath=../src/obj
4 INCLUDES = -I..
5
6 SRC_DIR = ./
7 OBJ_DIR = ./obj
8
9 TARGET = test
10
11 SRC_FILES = $(wildcard $(SRC_DIR)/*.c)
12 H_FILES = lut.h helpers.h
13 OBJ_FILES = $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC_FILES))
14
15 all: $(TARGET)
16
17 $(TARGET): $(OBJ_FILES)
18 $(CC) $(LDFLAGS) -o $@ $^
19
20 $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(H_FILES)
21 $(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<
22
23 clean:
24 rm -f $(OBJ_DIR)/*.o $(TARGET)
25
26 .PHONY: all clean