33 lines
493 B
Makefile
33 lines
493 B
Makefile
#Makefile to build test case
|
|
CC = gcc
|
|
BASEDIR = .
|
|
#CFLAGS = -Wall -I.
|
|
# -g for debugging with gdb
|
|
#CFLAGS = -Wall -I. -g
|
|
CFLAGS = -Wall -Iinclude -Itest -DTEST -DTEST_ADDRESS -g
|
|
|
|
SRCS = src/address.c \
|
|
src/bacaddr.c \
|
|
test/ctest.c
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
TARGET = address
|
|
|
|
all: ${TARGET}
|
|
|
|
${TARGET}: ${OBJS}
|
|
${CC} -o $@ ${OBJS}
|
|
|
|
.c.o:
|
|
${CC} -c ${CFLAGS} $*.c -o $@
|
|
|
|
depend:
|
|
rm -f .depend
|
|
${CC} -MM ${CFLAGS} *.c >> .depend
|
|
|
|
clean:
|
|
rm -rf ${TARGET} $(OBJS)
|
|
|
|
include: .depend
|