################################################################################
# Makefile for TARGET
################################################################################
TARGET  = tst
CPPFLAGS = -g2  -Wall

OBJS = \
	CWinEventHandle.o \
	WinEvent.o \
	main.o \

LDLIBS = \
	-lpthread \
	-lrt \

target: $(OBJS)
	$(CC) -o $(TARGET) $(OBJS) $(LDLIBS)
	chmod a+x $(TARGET)

install:

################################################################################
# Target independent
################################################################################
CC = g++
SRCS = ${OBJS:.o=.cpp}

#cpp rule
%.o: %.cpp
	$(CC) -c $(CPPFLAGS) -o $@ $<

#Qt Meta-Object-Compiler rule
moc_%.cpp: %.h
	$(QTDIR)/bin/moc $< -o $@

clean:
	rm -f $(OBJS) $(TARGET)

#Dependencies
depend:
	$(CC) -M $(CPPFLAGS) $(SRCS) > depend_$(TARGET).mak

-include depend_$(TARGET)

