ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/target.mk
Revision: 1.33
Committed: Wed Sep 13 15:25:08 2017 UTC (6 years ago) by arta
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-41, Ver_9-5, Ver_9-4, Ver_9-3, Ver_9-2, NetDRMS_Ver_LATEST, NetDRMS_Ver_9-41, NetDRMS_Ver_9-3, NetDRMS_Ver_9-2, NetDRMS_Ver_9-5, NetDRMS_Ver_9-4
Changes since 1.32: +3 -0 lines
Log Message:
make a fpic version of DRMS lib and DB lib in preparation for Python DRMS package

File Contents

# User Rev Content
1 arta 1.1 # This is used to jump from a source directory to a target directory.
2    
3     .SUFFIXES:
4    
5    
6     # Find the target directory(ies).
7     #
8     ifndef JSOC_MACHINE
9     JSOC_MACHINE := $(shell build/jsoc_machine.csh)
10     export JSOC_MACHINE
11     endif
12    
13 arta 1.13 ifeq ($(MACH),)
14     MACH = $(JSOC_MACHINE)
15     endif
16    
17     OBJDIR := _$(MACH)
18 arta 1.5 PROJOBJDIR := $(OBJDIR)/proj
19 arta 1.1
20     all: $(PROJOBJDIR) $(OBJDIR)
21    
22     # Define the rules to build in the target subdirectories.
23     #
24 arta 1.17 MAKETARGET = $(MAKE) --no-print-directory -C $@ -f $(WORKINGDIR)/Makefile \
25 jsoc 1.11 SRCDIR=$(WORKINGDIR) $(MAKECMDGOALS)
26 arta 1.1
27     .PHONY: $(PROJOBJDIR) $(OBJDIR)
28    
29     # Create the project-specific directories too, if they exist.
30 arta 1.27 # This supplementary target.mk file is built by the configure script, using either
31     # configsdp.txt (for a JSOC-SDP checkout) or a custom configuration file as input.
32     -include $(WORKINGDIR)/$(LOCALIZATIONDIR)/target.mk
33 arta 1.1
34     $(OBJDIR):
35 arta 1.13 +@[ -d bin/$(MACH) ] || mkdir -p bin/$(MACH)
36     +@[ -d lib/$(MACH) ] || mkdir -p lib/$(MACH)
37 arta 1.1 +@[ -d $@ ] || mkdir -p $@
38 arta 1.5 +@[ -d $@/base/drms/apps ] || mkdir -p $@/base/drms/apps
39 arta 1.32 +@[ -d $@/base/drms/apps/test ] || mkdir -p $@/base/drms/apps/test
40 arta 1.5 +@[ -d $@/base/drms/libs/api/client ] || mkdir -p $@/base/drms/libs/api/client
41     +@[ -d $@/base/drms/libs/api/server ] || mkdir -p $@/base/drms/libs/api/server
42 arta 1.33 +@[ -d $@/base/drms/libs/api/server-fpic ] || mkdir -p $@/base/drms/libs/api/server-fpic
43 arta 1.5 +@[ -d $@/base/drms/libs/main/c ] || mkdir -p $@/base/drms/libs/main/c
44     +@[ -d $@/base/drms/libs/main/f ] || mkdir -p $@/base/drms/libs/main/f
45     +@[ -d $@/base/drms/libs/main/idl ] || mkdir -p $@/base/drms/libs/main/idl
46     +@[ -d $@/base/drms/libs/meta ] || mkdir -p $@/base/drms/libs/meta
47 arta 1.33 +@[ -d $@/base/drms/libs/py ] || mkdir -p $@/base/drms/libs/py
48 arta 1.22 +@[ -d $@/base/export/apps ] || mkdir -p $@/base/export/apps
49     +@[ -d $@/base/export/libs/util ] || mkdir -p $@/base/export/libs/util
50 arta 1.26 +@[ -d $@/base/export/libs/exportDRMS ] || mkdir -p $@/base/export/libs/exportDRMS
51 arta 1.31 +@[ -d $@/base/libs/cjson ] || mkdir -p $@/base/libs/cjson
52 arta 1.18 +@[ -d $@/base/libs/cmdparams/test ] || mkdir -p $@/base/libs/cmdparams/test
53 arta 1.5 +@[ -d $@/base/libs/db/client ] || mkdir -p $@/base/libs/db/client
54     +@[ -d $@/base/libs/db/server ] || mkdir -p $@/base/libs/db/server
55 arta 1.33 +@[ -d $@/base/libs/db/server-fpic ] || mkdir -p $@/base/libs/db/server-fpic
56 arta 1.10 +@[ -d $@/base/libs/defs/fpic ] || mkdir -p $@/base/libs/defs/fpic
57 arta 1.5 +@[ -d $@/base/libs/dstruct/fpic ] || mkdir -p $@/base/libs/dstruct/fpic
58 arta 1.22 +@[ -d $@/base/libs/json ] || mkdir -p $@/base/libs/json
59 arta 1.29 +@[ -d $@/base/libs/jsmn ] || mkdir -p $@/base/libs/jsmn
60 arta 1.5 +@[ -d $@/base/libs/inthandles ] || mkdir -p $@/base/libs/inthandles
61 arta 1.19 +@[ -d $@/base/libs/qdecoder/md5 ] || mkdir -p $@/base/libs/qdecoder/md5
62 arta 1.5 +@[ -d $@/base/libs/threads/fpic ] || mkdir -p $@/base/libs/threads/fpic
63     +@[ -d $@/base/libs/timeio/fpic ] || mkdir -p $@/base/libs/timeio/fpic
64     +@[ -d $@/base/libs/misc/fpic ] || mkdir -p $@/base/libs/misc/fpic
65 arta 1.6 +@[ -d $@/base/libs/fitsrw/fpic ] || mkdir -p $@/base/libs/fitsrw/fpic
66 arta 1.8 +@[ -d $@/base/libs/errlog ] || mkdir -p $@/base/libs/errlog
67 arta 1.5 +@[ -d $@/base/local/libs/dsds ] || mkdir -p $@/base/local/libs/dsds
68     +@[ -d $@/base/local/libs/soi ] || mkdir -p $@/base/local/libs/soi
69     +@[ -d $@/base/sums/apps ] || mkdir -p $@/base/sums/apps
70     +@[ -d $@/base/sums/libs/api ] || mkdir -p $@/base/sums/libs/api
71     +@[ -d $@/base/sums/libs/pg ] || mkdir -p $@/base/sums/libs/pg
72     +@[ -d $@/base/util/apps ] || mkdir -p $@/base/util/apps
73     +@[ -d $@/proj/example/apps ] || mkdir -p $@/proj/example/apps
74     +@[ -d $@/proj/myproj/apps ] || mkdir -p $@/proj/myproj/apps
75 arta 1.20 +@[ -d $@/proj/cookbook ] || mkdir -p $@/proj/cookbook
76 arta 1.1 +@$(MAKETARGET)
77    
78     # These rules keep make from trying to use the match-anything rule below to
79     # rebuild the makefiles--ouch! Obviously, if you don't follow my convention
80     # of using a `.mk' suffix on all non-standard makefiles you'll need to change
81     # the pattern rule.
82     #
83     Makefile : ;
84     %.mk :: ;
85    
86    
87     # Anything we don't know how to build will use this rule. The command is a
88     # do-nothing command, but the prerequisites ensure that the appropriate
89     # recursive invocations of make will occur.
90     #
91     % :: $(PROJOBJDIR) $(OBJDIR) ; :
92    
93    
94     # The clean rule is best handled from the source directory: since we're
95     # rigorous about keeping the target directories containing only target files
96     # and the source directory containing only source files, `clean' is as trivial
97     # as removing the target directories!
98     #
99     .PHONY: clean
100     clean:
101 arta 1.13 rm -rf $(OBJDIR); rm -rf bin/$(MACH); rm -rf lib/$(MACH)
102 arta 1.1