2022-03-02 18:28:38 -05:00
|
|
|
PLXBASE = /usr/opt/PlxSdk/PlxApi/Library/
|
|
|
|
CC = g++
|
|
|
|
CFLAGS = -c -Wall
|
|
|
|
LDFLAGS = -ldl -lm
|
|
|
|
ROOT_FLAG = `root-config --cflags --glibs`
|
|
|
|
|
|
|
|
#==== old pixie library
|
|
|
|
#APIBASE = /usr/opt/Pixie16/lib/
|
2022-03-15 15:55:31 -04:00
|
|
|
#PIXIE_LIB_PATH = -I$(APIBASE)app/ -I$(APIBASE)sys/
|
|
|
|
#PIXIE_LIB_PATH2 = -I$(APIBASE)inc/
|
2022-03-02 18:28:38 -05:00
|
|
|
#LIBS = $(APIBASE)libPixie16App.a $(APIBASE)libPixie16Sys.a $(PLXBASE)PlxApi.a
|
|
|
|
#
|
|
|
|
#all: test
|
|
|
|
#
|
|
|
|
#test : test.o Pixie16Class.o
|
|
|
|
# $(CC) test.o Pixie16Class.o $(LIBS) -o test
|
|
|
|
#
|
|
|
|
#test.o : test.cpp
|
2022-03-15 15:55:31 -04:00
|
|
|
# $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) $(PIXIE_LIB_PATH2) test.cpp $(ROOT_FLAG)
|
2022-03-02 18:28:38 -05:00
|
|
|
#
|
|
|
|
#Pixie16Class.o : Pixie16Class.h Pixie16Class.cpp DataBlock.h
|
2022-03-15 15:55:31 -04:00
|
|
|
# $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) $(PIXIE_LIB_PATH2) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG)
|
2022-03-02 18:28:38 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
#==== new pixie library
|
2022-03-15 15:55:31 -04:00
|
|
|
#the pixie.ini is not needed
|
|
|
|
PIXIE_LIB_PATH = -I/usr/opt/xia/PixieSDK/ -I/usr/opt/xia/PixieSDK/include/ -I/usr/opt/xia/PixieSDK/include/pixie16/
|
2022-03-02 18:28:38 -05:00
|
|
|
APIBASE = /usr/opt/xia/PixieSDK/lib/
|
|
|
|
LIBS = $(APIBASE)libPixie16Api.so $(APIBASE)libPixieSDK.a $(PLXBASE)PlxApi.a
|
|
|
|
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-15 16:50:15 -04:00
|
|
|
all: testing/test testing/example pixieDAQ
|
2022-03-02 18:28:38 -05:00
|
|
|
|
2022-03-15 15:55:31 -04:00
|
|
|
#--------------------------
|
|
|
|
pixieDAQ : pixieDAQ.o pixieDict.o pixieDict.cxx Pixie16Class.o mainSettings.o
|
|
|
|
@echo "-------- making pixieDAQ "
|
|
|
|
$(CC) $(PIXIE_LIB_PATH) pixieDAQ.o Pixie16Class.o mainSettings.o pixieDict.cxx $(LIBS) -o pixieDAQ $(ROOT_FLAG)
|
|
|
|
|
|
|
|
#--------------------------#need to export LD_LIBRARY_PATH
|
|
|
|
Pixie16Class.o : Pixie16Class.h Pixie16Class.cpp DataBlock.h
|
|
|
|
@echo "-------- making Pixie16Class.o "
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG)
|
|
|
|
|
|
|
|
pixieDict.cxx : pixieDAQ.h pixieDAQLinkDef.h
|
|
|
|
@echo "--------- creating pcm and cxx "
|
|
|
|
@rootcling -f pixieDict.cxx -c pixieDAQ.h -p $(PIXIE_LIB_PATH) pixieDAQLinkDef.h
|
|
|
|
|
2022-03-15 16:23:05 -04:00
|
|
|
pixieDAQ.o : pixieDict.cxx pixieDAQ.cpp pixieDAQ.h
|
2022-03-15 15:55:31 -04:00
|
|
|
@echo "--------- creating pixieDAQ.o"
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) pixieDAQ.cpp Pixie16Class.cpp pixieDict.cxx $(ROOT_FLAG)
|
|
|
|
|
|
|
|
mainSettings.o : mainSettings.cpp mainSettings.h
|
|
|
|
@echo "--------- creating mainSettings.o"
|
2022-03-16 18:46:14 -04:00
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) mainSettings.cpp $(ROOT_FLAG)
|
2022-03-15 15:55:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
#--------------------------
|
2022-03-15 16:50:15 -04:00
|
|
|
testing/example : testing/example.o
|
2022-03-15 14:38:58 -04:00
|
|
|
@echo "-------- making example"
|
2022-03-15 16:23:05 -04:00
|
|
|
$(CC) $(PIXIE_LIB_PATH) testing/example.o $(LIBS) -o testing/example
|
2022-03-02 18:28:38 -05:00
|
|
|
|
2022-03-15 16:50:15 -04:00
|
|
|
testing/example.o : testing/example.cpp
|
2022-03-15 14:38:58 -04:00
|
|
|
@echo "-------- making example.o"
|
2022-03-15 16:23:05 -04:00
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) testing/example.cpp -o testing/example.o
|
2022-03-07 16:22:04 -05:00
|
|
|
|
2022-03-15 15:55:31 -04:00
|
|
|
#--------------------------
|
2022-03-15 16:50:15 -04:00
|
|
|
testing/test : testing/test.o Pixie16Class.o
|
2022-03-07 16:22:04 -05:00
|
|
|
@echo "-------- making test"
|
2022-03-15 16:23:05 -04:00
|
|
|
$(CC) $(PIXIE_LIB_PATH) testing/test.o Pixie16Class.o $(LIBS) -o testing/test $(ROOT_FLAG)
|
2022-03-07 16:22:04 -05:00
|
|
|
|
2022-03-15 16:50:15 -04:00
|
|
|
testing/test.o : testing/test.cpp
|
2022-03-07 16:22:04 -05:00
|
|
|
@echo "-------- making test.o"
|
2022-03-15 16:23:05 -04:00
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) testing/test.cpp $(ROOT_FLAG) -o testing/test.o
|
2022-03-07 16:22:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
#origin root example
|
|
|
|
#pixieDAQ:
|
|
|
|
# @rootcling -f pixieDict.cxx -c pixieDAQ.h pixieDAQLinkDef.h
|
|
|
|
# $(CC) $(CFLAGS) pixieDAQ.cpp pixieDict.cxx $(ROOT_FLAG)
|
|
|
|
|
|
|
|
|
2022-03-02 18:28:38 -05:00
|
|
|
clean:
|
2022-03-15 16:23:05 -04:00
|
|
|
rm -f *.o testing/test testing/example testing/*.o *.pcm testing/example pixieDAQ *.gch *.cxx
|
2022-03-02 18:28:38 -05:00
|
|
|
|
|
|
|
|