source: SH_SHM/trunk/source/Makefile @ 358

Revision 358, 2.5 KB checked in by marcus, 8 years ago (diff)

r192 | walther | 2011-03-31 17:30:28 +0200 (Do, 31 Mär 2011) | 4 lines

  • locsat and fk source may be defined at command line
  • replacing makedepend by gccmakedep (bug not fixed for 5 years in Xorg)
  • added include to sysbase.h for proper macro definition
Line 
1
2# Makefile for SH
3# ===============
4#
5# version 21, 21-Dec-2006
6#
7# Makefile for directory $SH_SOURCE
8# K. Stammler, 11-Feb-93
9
10CFLAGS      = $(SH_CCOPTIONS) -fPIC -I$(SH_SOURCE) -I$(SH_UTIL) -I$(SH_SOURCE)/newgraph -I$(SH_SOURCE)/foreign -DBASECNST=\"basecnst.h\"
11CC          = $(SH_COMPILER)
12LD          = $(SH_COMPILER)
13RANLIB          = $(SH_RANLIB)
14LDFLAGS     = -L$(SH_LIB) $(SH_LINKOPTIONS)
15LIBS        = -lgraph -lsource -lgcf -lseed -lfrgn -lsource -lm -lX11 $(SH_LINKLIBS)
16#                                              ^
17#          this second '-lsource' is necessary /
18
19MAKEFILE                = Makefile
20PROGNAME    = ../shc
21SHDAEMON    = ../shd
22SHRDLIB     = ../libshc.so
23
24LIB_LOCAL       = $(SH_LIB)libsource.a
25LIB_SEED                = $(SH_LIB)libseed.a
26LIB_GCF         = $(SH_LIB)libgcf.a
27LIB_GRAPH       = $(SH_LIB)libgraph.a
28LIB_UTIL                = $(SH_LIB)libutil.a
29LIB_FRGN                = $(SH_LIB)libfrgn.a
30ALL_SH_LIBS     = $(LIB_LOCAL) $(LIB_GRAPH) $(LIB_SEED) $(LIB_GCF) $(LIB_UTIL) $(LIB_FRGN)
31SHD_OBJS        = port_io.o
32SHD_LIBS        = -lsocket -lnsl
33
34LOCAL_SRCS      = \
35        logplot.c   recfiltr.c  shlib.c     shmenuio.c  timeconv.c \
36        cmdparse.c  matrixhd.c  shmath.c    shmenux.c   travtime.c  residual.c \
37        cpar.c      numres.c    shcorr.c    shmenu0.c   shmidlev.c  usrinpw.c \
38        earthloc.c  polfiltr.c  shcursor.c  shmenu1.c   shpm.c      utility.c \
39        errmsg.c    ptravtim.c  shdataba.c  shmenu2.c   shsymbol.c  port_io.c \
40        fftfiltr.c  qfileio.c   shdspmgr.c  shmenu3.c   shtransl.c  sqliface.c \
41        fileopen.c  qfintrfc.c  shexec.c    shmenu4.c   statloc.c   globalparams.c \
42        incitheo.c  shhelp.c    shmenu5.c   syscall.c   callsh.c
43
44#LOCAL_OBJS     =       $(LOCAL_SRCS:%.c=%.o)
45LOCAL_OBJS      =       $(LOCAL_SRCS:.c=.o)
46
47all:  $(PROGNAME)
48
49$(LIB_LOCAL):   $(LOCAL_OBJS)
50        ar r $@ $(LOCAL_OBJS); $(RANLIB) $@
51
52$(LIB_GRAPH):  FORCE
53        cd newgraph; make
54
55$(LIB_SEED):   FORCE
56        cd seed_io; make
57
58$(LIB_GCF):   FORCE
59        cd gcf; make
60
61$(LIB_UTIL):   FORCE
62        cd ../util; make
63
64$(LIB_FRGN):   FORCE
65        cd foreign; make
66
67FORCE:
68
69$(PROGNAME):    seismhan.o $(MAKEFILE) $(ALL_SH_LIBS)
70        @echo "Linking $(PROGNAME) ..."
71        $(LD) seismhan.o $(LDFLAGS) $(LIBS) -o $(PROGNAME)
72        $(LD) -shared -o $(SHRDLIB) -lc seismhan.o $(LDFLAGS) $(LIBS)
73
74#$(SHDAEMON):   shd.o $(MAKEFILE) $(SHD_OBJS)
75#       @echo "Linking $(SHDAEMON) ..."
76#       $(LD) shd.o $(SHD_OBJS) $(SHD_LIBS) -o $(SHDAEMON)
77
78
79clean:
80        -@rm *% $(LOCAL_OBJS) seismhan.o $(ALL_SH_LIBS) $(PROGNAME) $(PROGNAME)_world $(SHRDLIB)
81        -@cd seed_io; make clean
82        -@cd foreign; make clean
83        -@cd newgraph; make clean
84        -@cd ../util; make clean
85
86
87depend:
88        gccmakedep -s "# DO NOT DELETE" -- $(CFLAGS) -- $(LOCAL_SRCS) seismhan.c
89
90
91# DO NOT DELETE
92
Note: See TracBrowser for help on using the repository browser.