summaryrefslogtreecommitdiffstats
path: root/vmchooser/Makefile
blob: 4e3cbc51a90db8e55d4f98d6057edbc51962e5c3 (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
36
37
38
39
TARGET  := vmchooser
SRCS    := $(wildcard *.cxx)
OBJS    := ${SRCS:.cxx=.o} 
DEPS    := ${SRCS:.cxx=.dep} 
XDEPS   := $(wildcard ${DEPS}) 

CC	= g++
DEBUG_CCFLAGS = -O0 -Wall -I/usr/include -I../fltk/ -I. -I../libxml2/include -ggdb #-ggdb #-Werror
CCFLAGS = -O2 -Wall -I/usr/include -I../fltk/ -I../libxml2/include/
LDFLAGS = -L/usr/lib 
LIBS    = -lpng ../fltk/lib/libfltk2_images.a -ljpeg -lz -lXi -lXinerama -lpthread -lm -lXext -lsupc++ -lXrender -lfontconfig -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 ../libxml2/libs/libxml2.a ../fltk/lib/libfltk2.a /usr/lib/libboost_regex-s.a /usr/lib/libboost_filesystem-s.a

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

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

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

debug: ${OBJS}
	${CC} ${LDFLAGS} -o vmchooserdbg $^ ${LIBS}

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

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

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

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

distclean:: clean