2022-03-02 18:28:38 -05:00
|
|
|
PLXBASE = /usr/opt/PlxSdk/PlxApi/Library/
|
|
|
|
CC = g++
|
2022-03-30 13:13:24 -04:00
|
|
|
CFLAGS = -c -Wall -lpthread
|
2022-03-02 18:28:38 -05:00
|
|
|
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-30 18:48:58 -04:00
|
|
|
OBJS = pixieDAQ.o Pixie16Class.o settingsSummary.o scalarPanel.o moduleSetting.o channelSetting.o
|
2022-03-30 13:13:24 -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
|
|
|
#--------------------------
|
2022-03-30 13:13:24 -04:00
|
|
|
pixieDAQ : pixieDict.cxx $(OBJS)
|
2022-03-15 15:55:31 -04:00
|
|
|
@echo "-------- making pixieDAQ "
|
2022-03-30 13:13:24 -04:00
|
|
|
$(CC) $(PIXIE_LIB_PATH) $(OBJS) pixieDict.cxx $(LIBS) -o pixieDAQ $(ROOT_FLAG)
|
2022-03-15 15:55:31 -04:00
|
|
|
|
|
|
|
#--------------------------#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)
|
|
|
|
|
2022-03-30 13:13:24 -04:00
|
|
|
settingsSummary.o : settingsSummary.cpp settingsSummary.h
|
|
|
|
@echo "--------- creating settingsSummary.o"
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) settingsSummary.cpp $(ROOT_FLAG)
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-30 13:13:24 -04:00
|
|
|
scalarPanel.o : scalarPanel.cpp scalarPanel.h
|
|
|
|
@echo "--------- creating scalarPanel.o.o"
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) scalarPanel.cpp $(ROOT_FLAG)
|
2022-03-15 15:55:31 -04:00
|
|
|
|
2022-03-30 18:33:44 -04:00
|
|
|
moduleSetting.o : moduleSetting.cpp moduleSetting.h
|
|
|
|
@echo "--------- creating moduleSetting.o"
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) moduleSetting.cpp $(ROOT_FLAG)
|
|
|
|
|
2022-03-30 18:48:58 -04:00
|
|
|
channelSetting.o : channelSetting.cpp channelSetting.h
|
|
|
|
@echo "--------- creating channelSetting.o"
|
|
|
|
$(CC) $(CFLAGS) $(PIXIE_LIB_PATH) channelSetting.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
|
|
|
|
|
|
|
|