source: Sophya/trunk/SophyaProg/Examples/ex_makefile@ 4057

Last change on this file since 4057 was 2437, checked in by cmv, 22 years ago

chgt DPC...REP en SOPHYA...REP et EROSCXX en SOPHYACXX cmv 17/09/2003

  • Property svn:executable set to *
File size: 1.8 KB
RevLine 
[1433]1# ------------------ SOPHYA -------------------------
2# Makefile fot compiling and linking a simple C++
3# program with SOPHYA class library
4# ---------------------------------------------------
5# GNU make program should be used with this makefile
6# ---------------------------------------------------
7# Usage: make
8# - compiles ex1.cc -> Objs/ex1.o
9# - links Objs/ex1.o -> Objs/ex1
10# make depend
11# to create the Objs/ directory
12
13# SOPHYA compilation rules - OPTFLAG and DBGFLAG
14# can be used to define Debug and optimization flags
15# Additional options can be specified using USERFLAGS
16# USERFLAGS := -I/.../myincludes
17
[2437]18include $(SOPHYABASEREP)/Include/MakefileUser.h
[1433]19
20
21# ----- List of SOPHYA libraries
22ifdef NOSHLIB
23LIBF = $(LIB)libLinAlg.a $(LIB)libIFFTW.a $(LIB)libFitsIOServer.a $(LIB)libSamba.a $(LIB)libSkyMap.a $(LIB)libSkyT.a $(LIB)libNTools.a $(LIB)libHiStats.a $(LIB)libTArray.a $(LIB)libSysTools.a
24LIBS = -L$(LIB) -lLinAlg -lIFFTW -lFitsIOServer -lSamba -lSkyMap -lSkyT -lNTools -lHiStats -lTArray -lSysTools -lm
25ifeq ($(CXX),cxx)
26# librairie des instances de templates cxx
27LIBS := $(LIBS) -lsotcxx
28endif
29else
30LIBF = $(SLB)libsophya.so $(SLB)libextsophya.so
31LIBS = -L$(SLB) -lextsophya -lsophya -lm
32endif
33
34LDLIBS := $(LIBS) $(LDLIBS)
35
36# Object and executable files will be put in
37MYOBJS := Objs/
38
39# --- Compilation and linking rules
40$(MYOBJS)%.o:%.cc
41 $(COMPILE.cc) $(USERFLAGS) -o $@ $<
42
43$(MYOBJS)%:%.c
44 $(COMPILE.c) $(USERFLAGS) -o $@ $<
45
46
47# list of default build target
48all : depend $(MYOBJS)ex1
49
50# Clean procedure
51clean :
52 rm -f $(MYOBJS)ex1 $(MYOBJS)ex1.o
53# Directory buid procedure
54depend :
55 if (test ! -d $(MYOBJS) ) then mkdir $(MYOBJS) ; fi
56
57# build rules for ex1
58$(MYOBJS)ex1 : $(MYOBJS)ex1.o
59 $(LINK.cc) $^ $(LIBS) -o $@
60$(MYOBJS)ex1.o : ex1.cc
61
62
63
Note: See TracBrowser for help on using the repository browser.