ifneq ($(V),1)
Q := @
endif
INCDIR = -I include/
CCFLAGS = -g -O2 -Wall -W $(INCDIR)
CXXFLAGS = $(CCFLAGS)
LDFLAGS =
LIBS = -L/usr/X11R6/lib -lm -lpthread -lX11
CC = gcc $(CCFLAGS)
CXX = g++ $(CXXFLAGS)
LD = g++ $(LDFLAGS)
BINS = omview
OBJS = omview.o
all: $(BINS)
clean:
$(Q) rm -f *.o $(BINS) $(OBJS)
@printf " CLEAN\n";
.c.o:
@printf " CC $(subst $(shell pwd)/,,$(@))\n";
$(Q) $(CC) -c -o$@ $<
.cpp.o:
@printf " CXX $(subst $(shell pwd)/,,$(@))\n";
$(Q) $(CXX) -c -o$@ $<
omview: $(OBJS)
@printf " LD $(subst $(shell pwd)/,,$(@))\n";
$(Q) $(LD) -o$@ $(OBJS) $(LIBS)