node/deps/coupling/Makefile

34 lines
540 B
Makefile
Raw Normal View History

2009-10-04 04:43:54 +08:00
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -I. -Wall -Werror -Wextra #-DNDEBUG=1
LDFLAGS = -pthread
CC = gcc
AR = ar
RANLIB = ranlib
DEP = coupling.h
SRC = coupling.c
OBJ = ${SRC:.c=.o}
NAME=libcoupling
OUTPUT_A=$(NAME).a
2010-04-01 02:27:57 +08:00
all: $(OUTPUT_A)
2009-10-04 04:43:54 +08:00
$(OUTPUT_A): $(OBJ)
$(AR) cru $(OUTPUT_A) $(OBJ)
$(RANLIB) $(OUTPUT_A)
.c.o:
$(CC) -c ${CFLAGS} $<
${OBJ}: ${DEP}
test: test.c $(OUTPUT_A)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ test.c $(OUTPUT_A)
clean:
rm -f $(OUTPUT_A) *.o test
2010-04-01 02:27:57 +08:00
.PHONY: all clean