virtual servers can be compiled from top directory; include directory with users headers added

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@504 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2013-04-08 12:40:28 +00:00
parent 5e4c2f30b4
commit 8088e6231e
7 changed files with 31 additions and 38 deletions

View File

@ -19,15 +19,10 @@ HEADERS = $(SRC_CLNT:.cpp=.h) commonFiles/sls_detector_defs.h slsDetectorAnalysi
SRC_MYTHEN_SVC = mythenDetectorServer/server.c mythenDetectorServer/server_funcs.c mythenDetectorServer/communication_funcs.c mythenDetectorServer/firmware_funcs.c mythenDetectorServer/mcb_funcs.c mythenDetectorServer/trimming_funcs.c
DESTDIR ?= bin DESTDIR ?= bin
DOCDIR ?= docs DOCDIR ?= docs
all: package $(SRC_CLNT) all: package $(SRC_CLNT)
echo "compiling all" echo "compiling all"
@ -55,24 +50,17 @@ slsDetectorUsersDocs: slsDetectorUsers.doxy slsDetector/slsDetectorUsers.h slsDe
doxygen slsDetectorUsers.doxy doxygen slsDetectorUsers.doxy
mythenServer: $(SRC_MYTHEN_SVC) mythenVirtualServer: $(SRC_MYTHEN_SVC)
$(CC) $(SRC_MYTHEN_SVC) $(CFLAGS) $(FLAGS) $(DFLAGS) $(INCLUDES) -ImythenDetectorServer -DVIRTUAL -lm -D MCB_FUNCS -DC_ONLY -DVERBOSE cd mythenDetectorServer && make -f Makefile.virtual DESTDIR=$(DESTDIR)
mv a.out mythenServer
picassoServer: $(SRC_MYTHEN_SVC)
$(CC) $(SRC_MYTHEN_SVC) $(CFLAGS) $(FLAGS) $(DFLAGS) $(INCLUDES) -ImythenDetectorServer -D VIRTUAL -lm -DMCB_FUNCS -DPICASSOD -DC_ONLY
mv a.out picassoServer
gotthardVirtualServer: $(SRC_MYTHEN_SVC)
cd gotthardDetectorServer && make -f Makefile.virtual DESTDIR=$(DESTDIR)
%.o : %.cpp %.h Makefile %.o : %.cpp %.h Makefile
$(CXX) -Wall -o $@ -c $< $(INCLUDES) $(DFLAGS) $(FLAGS) -fPIC $(EPICSFLAGS) -L/usr/lib64/ $(CXX) -Wall -o $@ -c $< $(INCLUDES) $(DFLAGS) $(FLAGS) -fPIC $(EPICSFLAGS) -L/usr/lib64/
package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(DESTDIR)/libSlsDetector.so: $(OBJS) $(DESTDIR)/libSlsDetector.so: $(OBJS)
@ -94,6 +82,6 @@ install: package
install_inc: install_inc:
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
cp -P slsDetector/slsDetectorUsers.h slsDetectorAnalysis/detectorData.h $(DESTDIR) cp -P slsDetector/slsDetectorUsers.h slsDetectorAnalysis/detectorData.h $(DESTDIR) slsReceiver/slsReceiverUsers.h

View File

@ -1,41 +1,25 @@
# $Id: Makefile,v 1.1.1.1 2006/02/04 03:35:01 freza Exp $
# first compile
# make cris-axis-linux-gnu
DESTDIR ?= ./
CC = gcc CC = gcc
CFLAGS += -Wall -DMCB_FUNCS -DDACS_INT -DDEBUG -DVIRTUAL #-DVERBOSE -DVERYVERBOSE #-DVIRTUAL #-DDACS_INT_CSERVER CFLAGS += -Wall -DMCB_FUNCS -DDACS_INT -DDEBUG -DVIRTUAL
PROGS= gotthardDetectorServer PROGS= $(DESTDIR)/gotthardVirtualServer
INSTDIR= /tftpboot
INSTMODE= 0777
BINS = testlib_sharedlibc
SRCS = server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c SRCS = server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c
OBJS = $(SRCS:%.c=%.o) OBJS = $(SRCS:%.c=%.o)
gotthardVirtualServer = $(PROGS)
all: clean $(PROGS) all: clean $(PROGS)
boot: $(OBJS)
$(PROGS): $(OBJS) $(PROGS): $(OBJS)
echo $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@) $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
install: $(PROGS)
$(INSTALL) -d $(INSTDIR)
$(INSTALL) -m $(INSTMODE) $(PROGS) $(INSTDIR)
romfs:
$(ROMFSINST) /bin/$(PROGS)
clean: clean:
rm -rf $(PROGS) *.o *.gdb rm -rf $(PROGS) *.o *.gdb

View File

@ -0,0 +1 @@
../slsDetectorAnalysis/detectorData.h

View File

@ -0,0 +1 @@
../slsDetector/slsDetectorUsers.h

View File

@ -0,0 +1 @@
../slsReceiver/slsReceiverUsers.h

View File

@ -19,7 +19,7 @@ CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DDACS_INT $(VFLAGS)
LDLIBS+= -lm LDLIBS+= -lm
mythen: $(PROGS) mythen: clean $(PROGS)
all: $(PROGS) all: $(PROGS)
boot: $(OBJS) boot: $(OBJS)

View File

@ -0,0 +1,18 @@
DESTDIR?= ./
PROGS= $(DESTDIR)/mythenVirtualServer
SRCS= server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c
OBJS= $(SRCS:%.c=%.o)
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DDACS_INT $(VFLAGS) -DVIRTUAL -DVERBOSE
LDLIBS+= -lm
mythenVirtualServer : clean $(PROGS)
$(PROGS): $(SRCS)
gcc $(LDFLAGS) $(SRCS) $(LDLIBS) $(CFLAGS) -o $@
clean:
rm -f *.o $(PROGS)