source: PSPA/madxPSPA/make/compiler.rules @ 478

Last change on this file since 478 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.3 KB
Line 
1# |
2# o---------------------------------------------------------------------o
3# |
4# | MAD makefile - compilers rules
5# |
6# o---------------------------------------------------------------------o
7# |
8# | Methodical Accelerator Design
9# |
10# | Copyright (c) 2011+ CERN, mad@cern.ch
11# |
12# | For more information, see http://cern.ch/mad
13# |
14# o---------------------------------------------------------------------o
15# |
16# | $Id$
17# |
18
19vpath %.o $(OBJDIR)
20
21#
22# rule C compilation
23#
24%.o: %.c
25        $E "*** Compiling $(<F)"
26        $_ $(call CC_tr,$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $(OBJDIR)$/$(@F))
27
28#
29# rule C++ compilation
30#
31%.o: %.cpp
32        $E "*** Compiling $(<F)"
33        $_ $(call CXX_tr,$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o $(OBJDIR)$/$(@F))
34
35#
36# rule f90 compilation
37#
38%.o: %.f90
39        $E "*** Compiling $(<F)"
40        $_ $(call FC_tr,$(FC) $(FFLAGS) $(CPPFLAGS) $< -o $(OBJDIR)$/$(@F))
41
42#
43# rule F90 compilation (same as f90 due to case insensitive file systems)
44#
45%.o: %.F90
46        $E "*** Compiling $(<F)"
47        $_ $(call FC_tr,$(FC) $(FFLAGS) $(CPPFLAGS) $< -o $(OBJDIR)$/$(@F))
48
49#
50# compute object files
51#
52CC_OBJ  := $(patsubst %.c,%.o,$(CC_SRC))
53CXX_OBJ := $(patsubst %.cpp,%.o,$(CXX_SRC))
54FC_OBJ  := $(patsubst %.F90,%.o,$(patsubst %.f90,%.o,$(FC_SRC)))
55
56HEADERS := $(CC_HDR) $(CXX_HDR)
57SOURCES := $(CC_SRC) $(CXX_SRC) $(FC_SRC)
58OBJECTS := $(CC_OBJ) $(CXX_OBJ) $(FC_OBJ)
59
60# end of makefile
Note: See TracBrowser for help on using the repository browser.