summaryrefslogtreecommitdiffstats
path: root/vmchooser/Makefile
blob: 19aa6ba8b307eb61ac7e9d24554fdcc04882d7b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TARGET  := vmchooser
SRCS    := $(wildcard *.cxx)
OBJS    := ${SRCS:.cxx=.o} 
DEPS    := ${SRCS:.cxx=.dep} 
XDEPS   := $(wildcard ${DEPS}) 

CC	= g++
CCFLAGS = -O2 -Wall -I/usr/include -I../fltk-2/include/ -I. `xml2-config --cflags` #-ggdb #-Werror
LDFLAGS = -L../fltk-2/lib/ -L/usr/lib 
LIBS    = -lpng ../fltk-2/lib/libfltk2_images.a -ljpeg -lz -lXi -lXinerama -lpthread -lm -lXext -lsupc++ -lXrender -lfontconfig -lxml2 -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 ../fltk-2/lib/libfltk2.a /usr/lib/libboost_regex.a

.PHONY: all clean distclean 
all:: ${TARGET} 

ifneq (${XDEPS},) 
include ${XDEPS} 
endif 

${TARGET}: ${OBJS} 
	${CC} ${LDFLAGS} -o $@ $^  ${LIBS} 
	strip $@

${OBJS}: %.o: %.cxx %.dep
	${CC} ${CCFLAGS} -o $@ -c $< 

${DEPS}: %.dep: %.cxx Makefile 
	${CC} ${CCFLAGS} -MM $< > $@ 

clean::
	rm -f *~ *.o ${TARGET} 

install:
	cp vmchooser ../../../../openslx/trunk/os-plugins/plugins/vmchooser/files/

distclean:: clean