CPPFLAGS += -I.. -I../include
# Mac OSX options
+ifeq ($(UNAME), Darwin)
+CPPFLAGS += -D_XOPEN_SOURCE -DMAC
+endif
SRCS = $(wildcard *.c)
-OBJS = $(patsubst %.c,%.o,$(SRCS))
+CPSRCS = $(wildcard *.cc)
+OBJS = $(patsubst %.c,%.o,$(SRCS)) $(patsubst %.cc,%.o,$(CPSRCS))
all: $(OBJS)
%.o: %.c
$(CC) -o $@ $< $(CPPFLAGS) -L.. -l$(LIB_NAME)
+%.o: %.cc
+ $(CXX) -o $@ $< $(CPPFLAGS) -L.. -l$(LIB_NAME)
+
clean::
rm -f *.o