NAME	= wouxun

CXX	= /usr/bin/g++
RM	= rm -f
INSTALL	= install

CXXFLAGS= -pipe -Wall -Wextra -O2 -g
LDFLAGS	= 

OBJS	= main.o throw.o comm.o cmds.o cli.o file.o util.o chan.o
SRCS	= $(OBJS:.o=.cc)

.PHONY: all
all: dep $(NAME)

.PHONY: dep
dep:	.depend

.depend:
	$(CXX) -MM $(CXXFLAGS) $(SRCS) 1> .depend

$(NAME): $(OBJS)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) -o $(NAME) $(OBJS)

.PHONY: clean
clean:
	$(RM) $(OBJS) $(NAME) .depend

.PHONY: install
install:

ifneq ($(wildcard .depend),)
include .depend
endif
