Made Makefile for x_ctypes
This commit is contained in:
parent
d4f45c5e48
commit
5b3224c60c
25
x_ctypes/src/Makefile
Normal file
25
x_ctypes/src/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
.POSIX:
|
||||
|
||||
|
||||
TEST_SRC = $(wildcard tests/*c)
|
||||
TEST_OBJ = $(TEST_SRC:tests/%.c=tests/%.o)
|
||||
SRC = x_ctypes.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
CFLAGS = -ggdb -Wall -Wextra -I.
|
||||
|
||||
run_testtest: test
|
||||
./test
|
||||
|
||||
test: $(TEST_OBJ) $(OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $(TEST_OBJ) $(OBJ)
|
||||
|
||||
|
||||
$(OBJ):
|
||||
|
||||
$(TEST_OBJ): $(TEST_SRC)
|
||||
$(CC) $(CFLAGS) -c $(TEST_SRC) -o $@
|
||||
|
||||
clean:
|
||||
rm -f test $(OBJ) $(TEST_OBJ)
|
||||
|
||||
.PHONY: all clean_all clean install uninstall test
|
Loading…
Reference in New Issue
Block a user