- Timestamp:
- Dec 8, 2007, 11:29:14 PM (18 years ago)
- Location:
- trunk/SophyaProg/Examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Examples/Makefile
r2437 r3427 1 MODULECXXREPNAME := Tests 2 MODULEDECCXXFLAGS := -msg_quiet 3 include $(SOPHYADEVREP)/Include/Makefile.h 1 # ------------------ SOPHYA ------------------------- 2 # Makefile for compiling and linking C++ programs 3 # with SOPHYA 4 # The SOPHYABASE environment variable should be defined 4 5 6 include $(SOPHYABASE)/include/sophyamake.inc 5 7 6 ifdef NOSHLIB 8 all : ex1 7 9 8 LIBF = $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 9 LIBS = -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz -lm 10 #LIBS = -L$(LIB) -lSysTools -lm 11 ifeq ($(CXX),cxx) 12 # librairie des instances de templates cxx 13 LIBS := $(LIBS) -lrt 14 endif 10 clean : 11 rm ex1.o ex1 15 12 16 else 17 18 LIBF = $(SLB)libsophya.so 19 LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm 20 ifeq ($(MACHEROS),OSF1) 21 LIBS := $(LIBS) -lfor 22 endif 23 ifeq ($(MACHEROS),Linux) 24 LIBS := $(LIBS) -ldl -lf2c 25 endif 26 27 endif 28 29 LDLIBS := $(LIBS) $(LDLIBS) 30 31 %:%.cc 32 %:%.o 33 %.o:%.cc 34 %.o:%.c 35 %:%.c 36 37 .PRECIOUS: $(EXE)% $(OBJ)%.o 38 39 %:$(EXE)% 40 echo $@ " done" 41 42 $(EXE)%:$(OBJ)%.o 43 $(LINK.cc) -o $@ $< $(LIBS) 44 45 $(OBJ)%.o:%.cc 46 $(COMPILE.cc) $(USERFLAGS) -o $@ $< 47 48 $(EXE)%:$(OBJ)%.cc 49 $(LINK.cc) $(USERFLAGS) -o $@ $< $(LIBS) 50 51 $(EXE)%:$(OBJ)%.c 52 $(LINK.c) $(USERFLAGS) -o $@ $< $(LIBS) 53 54 $(OBJ)%.o:%.c 55 $(COMPILE.c) -c $(CFLAGS) $(USERFLAGS) -o $@ $< 56 57 dump : 58 echo $(LIBS) 59 13 ex1 : ex1.o 14 $(CXXLINK) -o ex1 ex1.o $(SOPHYASLBLIST) 15 ex1.o : ex1.cc 16 $(CXXCOMPILE) -c -o ex1.o ex1.cc -
trunk/SophyaProg/Examples/auto_makefile
r2437 r3427 1 1 # ------------------ SOPHYA ------------------------- 2 # Makefile fo tcompiling and linking a simple C++2 # Makefile for compiling and linking a simple C++ 3 3 # program with SOPHYA class library 4 4 # --------------------------------------------------- … … 9 9 # - links prog_name.o -> prog_name 10 10 11 # SOPHYA compilation rules - OPTFLAG and DBGFLAG12 # can be used to define Debug and optimization flags13 # Additional options can be specified using USERFLAGS14 # USERFLAGS := -I/.../myincludes15 11 16 include $(SOPHYABASE REP)/Include/MakefileUser.h12 include $(SOPHYABASE)/include/sophyamake.inc 17 13 18 14 19 # ----- List of SOPHYA libraries20 ifdef NOSHLIB21 LIBF = $(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.a22 LIBS = -L$(LIB) -lLinAlg -lIFFTW -lFitsIOServer -lSamba -lSkyMap -lSkyT -lNTools -lHiStats -lTArray -lSysTools -lm23 ifeq ($(CXX),cxx)24 # librairie des instances de templates cxx25 LIBS := $(LIBS) -lsotcxx26 endif27 else28 LIBF = $(SLB)libsophya.so $(SLB)libextsophya.so29 LIBS = -L$(SLB) -lextsophya -lsophya -lm30 endif31 32 LDLIBS := $(LIBS) $(LDLIBS)33 15 34 16 %:%.cc 35 17 %:%.o 36 18 %.o:%.cc 37 %.o:%.c38 %:%.c39 19 40 20 .PRECIOUS: % %.o … … 43 23 # --- Compilation and linking rules 44 24 %:%.o 45 $( LINK.cc) -o $@ $< $(LIBS)25 $(CXXLINK) -o $@ $< $(SOPHYAEXTSLBLIST) 46 26 47 27 %.o:%.cc 48 $(COMPILE.cc) $(USERFLAGS) -o $@ $< 49 50 %:%.c 51 $(LINK.c) $(USERFLAGS) -o $@ $< $(LIBS) 28 $(CXXCOMPILE) -c -o $@ $< 52 29 53 30 -
trunk/SophyaProg/Examples/ex1.cc
r1337 r3427 4 4 #include "sophyainit.h" 5 5 6 #include "sopnamsp.h" 6 7 7 8 int main(int narg, char* arg[])
Note:
See TracChangeset
for help on using the changeset viewer.