Ignore:
Timestamp:
01/16/08 09:59:03 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Makefile

    r7787 r8809  
    33#   makefile
    44#
    5 #   for the MARS software
     5#   for the COSY software
    66#
    77##################################################################
     
    1919
    2020#
    21 
    22 PROGRAMS = testse starg cosy bend
     21PROGRAMS = cosy readcam
    2322SOLIB    = cosy.so
    2423CINT     = M
    25 INCLUDES = -I. -Imain  -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv -Imars
    26 LIBS     = -lpng -lz -L/usr/X11R6/lib -lpthread libmars.so
     24MARS_LIB = libmars.so
     25
     26INCLUDES = -I. -Imain -Imars -Ibase -Icandrv -Iincl -Ivideodev -Igui -Imvideo -Itcpip
    2727
    2828#
     
    3737#  ----->>>   mars libraries
    3838#
    39 SUBDIRS = \
    40         main    \
    41         tcpip    \
    42         gui      \
    43         catalog \
    44         videodev \
    45         devdrv  \
    46         candrv  \
    47         caos    \
    48         base    \
    49         slalib
     39SUBDIRS = base \
     40          candrv \
     41          caos \
     42          catalog \
     43          devdrv \
     44          gui \
     45          main \
     46          slalib \
     47          tcpip \
     48          videodev \
     49          mvideo
    5050
     51#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
    5152LIBRARIES = $(SUBDIRS:=.a)
     53CONDOR    = $(SUBDIRS:=.condor)
     54MRPROPERS = $(SUBDIRS:=.mrproper)
     55CLEANERS  = $(SUBDIRS:=.clean)
     56LIBS      = $(SOLIB)
    5257
    5358#------------------------------------------------------------------------------
     59.SUFFIXES: .c .cc .h .o .cxx .hxx .gch
    5460
    55 .SUFFIXES: .c .cc .h .o
    56 
    57 SRCFILES =
    58 
    59 SRCS    = $(SRCFILES)
    60 HEADERS = $(SRCFILES:.cc=.h)
    61 OBJS    = $(SRCFILES:.cc=.o)
     61SRCFILES =
    6262
    6363############################################################
     64all: $(SOLIB) $(PROGRAMS)
     65        @echo " Done. "
     66        @echo " "
    6467
    65 all: rmlib $(PROGRAMS) $(SOLIB)
    66 
    67 # Use $(CXX) -v ... for a more verbose output
    68 #
    69 # We could link mars.so instead of all libraries. This would need
    70 # some MBs less space on the HD. But this means, that the Shared
    71 # Library Path in your system must be set properly to be able to start
    72 # 'mars'
    73 #
    74 $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
    75         @echo " Linking $@ ..."
    76         $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) $@.o  $(MARS_LIB) $(ROOTGLIBS) -o $@
    77 
    78 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
    79         @echo " Linking $(SOLIB) ..."
    80         $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
    81         mv cosy.so lib
    82 
    83 $(LIBRARIES):
    84         @echo " " 
    85         @echo " Creating lib$@:"
    86         (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@)
    87 
    88 dox:
    89         @echo " Creating html documentation:"
    90         root -b -q dohtml.C
     68static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
     69#static: rmlib $(LIBRARIES) $(PROGRAMS)
     70static: $(LIBRARIES) $(PROGRAMS)
     71        @echo " Done. "
     72        @echo " "
    9173
    9274include Makefile.rules
    9375
    94 clean:  rmlib rmcint rmobjs rmcore rmbin
     76#
     77# Use $(CXX) -v ... for a more verbose output
     78#
     79$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) $(MARS_LIB)
     80        @echo " Linking shared object $(SOLIB) ..."
     81        $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(MARS_LIB) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
    9582
    96 mrproper:       clean rmbak
    97         @rm -f macros/*~
    98         @rm -rf htmldoc
    99         @echo "cd base"
    100         @cd base; make mrproper; cd ..
    101         @echo "cd .."
    102         @echo "cd caos"
    103         @cd caos; make mrproper; cd ..
    104         @echo "cd .."
    105         @echo "cd candrv"
    106         @cd candrv; make mrproper; cd ..
    107         @echo "cd .."
    108         @echo "cd devdrv"
    109         @cd devdrv; make mrproper; cd ..
    110         @echo "cd .."
    111         @echo "cd gui"
    112         @cd gui; make mrproper; cd ..
    113         @echo "cd .."
    114         @echo "cd videodev"
    115         @cd videodev; make mrproper; cd ..
    116         @echo "cd .."
    117         @echo "cd tcpip"
    118         @cd tcpip; make mrproper; cd ..
    119         @echo "cd .."
    120         @echo "cd catalog"
    121         @cd catalog; make mrproper; cd ..
    122         @echo "cd .."
    123         @echo "cd main"
    124         @cd main; make mrproper; cd ..
    125         @echo "cd .."
     83$(PROGRAMS): $(PROGRAMS:=.o) $(SOLIB)
     84        @echo " Linking $@ ..."
     85        $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o -o $@
     86
     87rmcondor:
     88        rm -f .makecondor.log
     89
     90condor: rmcondor $(CONDOR)
     91        echo Waiting for jobs to finish...
     92        condor_wait .makecondor.log
     93        rm .makecondor.log
     94        make -j2 $(PROGRAMS)
     95#       find -name "*/.makecondor.*"
     96#       find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
     97
     98dox: $(SOLIB)
     99        @echo
     100        @echo " Creating html documentation and logfile dohtml.log..."
     101        rm -f dohtml.log
     102        root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
     103        @echo " done."
     104        @echo
    126105
    127106links:
    128         @ln -sf /home/caos/March06/Mars/*/*.h mars
    129         @ln -sf /home/caos/March06/Mars/libmars.so
     107        mkdir -p mars
     108        cd mars; ln -sf ../../Mars/*/*.h .
     109        ln -sf ../Mars/libmars.so .
    130110
    131 magic:
    132         @ln -sf bending_magic.txt bending.txt
    133         @ln -sf prepos_magic.txt prepos.txt
    134         @ln -sf .cosyrc_magic .cosyrc
    135111
    136 model:
    137         @ln -sf bending_model.txt bending.txt
    138         @ln -sf prepos_model.txt prepos.txt
    139         @ln -sf .cosyrc_model .cosyrc
     112#clean: rmcint rmobjs rmdep rmcore rmlib
     113
     114mrproper:       $(MRPROPERS) rmbin rmbak rmbakmac clean
     115        @echo " Done."
     116        @echo " "
    140117
    141118tar:    mrproper
    142119        @echo "Making tar-file"
    143         @tar -cvf ../cosy.tar *
    144         @gzip -9 ../cosy.tar
     120        root -b -q -l -n tar.C
     121#       @tar cvf ../mars.tar --exclude=Root .rootrc *
     122#       @gzip -9 ../mars.tar
    145123
    146 install:
    147         @echo Installing cosy to ~stesy/Cosy
    148         @echo Copy 'cosy'
    149         @chmod u+w /home/stesy/Cosy/cosy
    150         @cp cosy /home/stesy/Cosy/
    151         @chmod a-w /home/stesy/Cosy/cosy
    152         @echo Copy cosy resources '.cosyrc'
    153         @chmod u+w /home/stesy/Cosy/.cosyrc
    154         @cp .cosyrc /home/stesy/Cosy/
    155         @chmod a-w /home/stesy/Cosy/.cosyrc
    156         @echo Copy bending model 'bending.txt'
    157         @chmod u+w /home/stesy/Cosy/bending.txt
    158         @cp bending.txt /home/stesy/Cosy
    159         @chmod a-w /home/stesy/Cosy/bending.txt
    160         @echo Copy LED offsets 'leds.txt'
    161         @chmod u+w /home/stesy/Cosy/leds.txt
    162         @cp leds.txt /home/stesy/Cosy/
    163         @chmod a-w /home/stesy/Cosy/leds.txt
    164         @echo Copy predefined positions 'prepos.txt'
    165         @chmod u+w /home/stesy/Cosy/prepos.txt
    166         @cp prepos.txt /home/stesy/Cosy/
    167         @chmod a-w /home/stesy/Cosy/prepos.txt
    168         @echo Copy star catalog 'stars.txt'
    169         @chmod u+w /home/stesy/Cosy/stars.txt
    170         @cp stars.txt /home/stesy/Cosy/
    171         @chmod a-w /home/stesy/Cosy/stars.txt
    172         @echo Copy PPM catalog
    173         @chmod u+w /home/stesy/Cosy/ppm9.bin
    174         @cp ppm9.bin /home/stesy/Cosy/
    175         @chmod a-w /home/stesy/Cosy/ppm9.bin
    176         @echo finished...
     124#Makefile.depend:
     125#       (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
     126#       echo " Generating dependancies into Makefile.depend" && \
     127#       makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
     128#       echo " ") || find -maxdepth 0 -true > /dev/null
     129#
     130#depend:        Makefile.depend
    177131
    178132# @endcode
Note: See TracChangeset for help on using the changeset viewer.