summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2008-07-10 22:37:57 +0200
committerBastian Wissler2008-07-10 22:37:57 +0200
commit4c028d3272ba51de962c357e400763da435e3919 (patch)
tree8252bc95d8519f9417e46e7e0f3cb50cc6b9d01c
parentvmchooser change: (diff)
downloadvmchooser-4c028d3272ba51de962c357e400763da435e3919.tar.gz
vmchooser-4c028d3272ba51de962c357e400763da435e3919.tar.xz
vmchooser-4c028d3272ba51de962c357e400763da435e3919.zip
vmchooser changes:
* Makefile more compatible -> now will compile any .cxx file in this folder -> will consider any changes in dependent files git-svn-id: http://svn.openslx.org/svn/openslx/openslx-src-tools/trunk/os-plugins/plugins/vmchooser@1925 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--vmchooser/Makefile55
-rw-r--r--vmchooser/SWindow.cxx6
-rw-r--r--vmchooser/anyoption.cxx (renamed from vmchooser/anyoption.cpp)0
3 files changed, 30 insertions, 31 deletions
diff --git a/vmchooser/Makefile b/vmchooser/Makefile
index 7225138..282c451 100644
--- a/vmchooser/Makefile
+++ b/vmchooser/Makefile
@@ -1,40 +1,35 @@
+TARGET := vmchooser
+SRCS := $(wildcard *.cxx)
+OBJS := ${SRCS:.cxx=.o}
+DEPS := ${SRCS:.cxx=.dep}
+XDEPS := $(wildcard ${DEPS})
-STATIC=# -static
-CXX=g++
-CFLAGS=-c -O2 -I../fltk-2/include/ -I. -Wall -g3 `xml2-config --cflags`
-BOOST=-lboost_regex-s
-LDFLAGS=-L../fltk-2/lib/ ../fltk-2/lib/libfltk2.a -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
+CC = g++
+CCFLAGS = -O2 -Wall -Werror -ggdb -I/usr/include -I../fltk-2/include/ -I. `xml2-config --cflags`
+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 -lboost_regex-s
-all: main.o anyoption.o SWindow.o readXmlDir.o readLinSess.o runImage.o addPrinters.o addScanners.o
- ${CXX} ${STATIC} main.o anyoption.o SWindow.o runImage.o readLinSess.o readXmlDir.o addPrinters.o addScanners.o -o vmchooser ${LDFLAGS} ${BOOST}
- #strip vmchooser
+.PHONY: all clean distclean
+all:: ${TARGET}
-main.o: main.cxx
- ${CXX} ${CFLAGS} -c main.cxx -o main.o
+ifneq (${XDEPS},)
+include ${XDEPS}
+endif
-anyoption.o: anyoption.cpp inc/anyoption.h
- ${CXX} ${CFLAGS} -o anyoption.o anyoption.cpp
-
-SWindow.o: SWindow.cxx inc/SWindow.h
- ${CXX} ${CFLAGS} -c SWindow.cxx -o SWindow.o
+${TARGET}: ${OBJS}
+ ${CC} ${LDFLAGS} -o $@ $^ ${LIBS}
+ strip $@
-readXmlDir.o: readXmlDir.cxx inc/functions.h
- ${CXX} ${CFLAGS} -o readXmlDir.o readXmlDir.cxx
+${OBJS}: %.o: %.cxx %.dep
+ ${CC} ${CCFLAGS} -o $@ -c $<
-readLinSess.o: readLinSess.cxx inc/functions.h
- ${CXX} ${CFLAGS} -o readLinSess.o readLinSess.cxx
+${DEPS}: %.dep: %.cxx Makefile
+ ${CC} ${CCFLAGS} -MM $< > $@
-runImage.o: runImage.cxx inc/functions.h
- ${CXX} ${CFLAGS} -o runImage.o runImage.cxx
-
-addPrinters.o: addPrinters.cxx inc/functions.h
- ${CXX} ${CFLAGS} -o addPrinters.o addPrinters.cxx
-
-addScanners.o: addScanners.cxx inc/functions.h
- ${CXX} ${CFLAGS} -o addScanners.o addScanners.cxx
-
-clean:
- rm -rf *.o vmchooser
+clean::
+ rm -f *~ *.o ${TARGET}
install:
cp vmchooser ../../../../../../openslx/trunk/os-plugins/plugins/vmchooser/files/
+
+distclean:: clean
diff --git a/vmchooser/SWindow.cxx b/vmchooser/SWindow.cxx
index 2c718bd..ef1a871 100644
--- a/vmchooser/SWindow.cxx
+++ b/vmchooser/SWindow.cxx
@@ -69,7 +69,9 @@ void SWindow::set_lin_entries(DataEntry** ent, char* slxgroup)
if( ent[i]->pools.empty() || ent[i]->pools.find(slxgroup) != string::npos) {
Item* w= (Item*)sel.add_leaf(ent[i]->short_description.c_str() , lin_entgroup, (void*)ent[i] );
- ((Widget*) w)->image(new xpmImage(get_symbol(ent[i])));
+ xpmImage* xpm = new xpmImage(get_symbol(ent[i]));
+ ((Widget*) w)->image(xpm);
+ xpm->setsize(100,100);
w->tooltip(ent[i]->description.c_str());
w->callback(&runImage, (void*)ent[i]);
}
@@ -97,6 +99,8 @@ void SWindow::set_entries(DataEntry** ent, char* slxgroup)
((Widget*) w)->image(xpm);
w->tooltip(ent[i]->description.c_str());
w->callback(&runImage, (void*)ent[i]);
+
+ xpm->setsize(100,100);
}
}
diff --git a/vmchooser/anyoption.cpp b/vmchooser/anyoption.cxx
index b11fbff..b11fbff 100644
--- a/vmchooser/anyoption.cpp
+++ b/vmchooser/anyoption.cxx