Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Message ID: 674     Entry time: 23 Nov 2009
Author: Exaos Lee 
Topic: Suggestion 
Subject: Scripts for "midas-config" 
Supposing you have installed MIDAS to some directory such as "/opt/MIDAS/r4621", you have to write some Makefile as the following while building some applications based on the version installed:

CFLAGS += -I/opt/MIDAS/r4621/include -DOS_LINUX -g -O2 -Wall -fPIC
LIBS += -lutil -lpthread -lodbc -lz

Why not use a script to record your MIDAS building options? When you want to build something based on it, just type something such as

M_CFLAGS := `midas-config --cflags`
M_LIBS := `midas-config --libs`

You needn't to check your installed options each time when you build something against it. Each time you install a new version of MIDAS, you only need to update the script called 'midas-config'. I wrote a sample script named "" in the first zipped attachment. The 2nd "midas-config" is a sampled generated by it. Also a diff of Makefile is included. I hope it may help. Smile
Attachment 1:  2 kB
Attachment 2: midas-config  2 kB  | Show | Show all
ELOG V3.1.4-2e1708b5