-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathMakefile_c
60 lines (46 loc) · 1.67 KB
/
Makefile_c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# |
# o---------------------------------------------------------------------o
# |
# | MAD makefile - C files selection
# |
# o---------------------------------------------------------------------o
# |
# | Methodical Accelerator Design
# |
# | Copyright (c) 2011+ CERN, mad@cern.ch
# |
# | For more information, see http://cern.ch/mad
# |
# o---------------------------------------------------------------------o
# |
# | $Id$
# |
vpath %.h src libs/DISTlib/source
vpath %.c src libs/DISTlib/source
vpath %.d $(OBJDIR)
CC_HDR :=$(notdir $(wildcard libs/DISTlib/source/*.h src/mad_*.h))
CC_SRC :=$(notdir $(wildcard libs/DISTlib/source/*.c src/mad_*.c))
CC_HDR += madx.h SDDS.h
CC_SRC +=
# files specific dependency flags
$(OBJDIR)/mad_gxx11c.d: CPPFLAGS += $(call incdir,/usr/X11/include /opt/X11/include)
# files specific compiler flag
mad_gcst.o: CPPFLAGS += -D_VERSION=$(VERSION) \
-D_VERSION_NUM=$(VERSION_NUM) \
-D_VERSION_DATE=$(VERSION_DATE) \
-D_VERSION_OSTYPE=$(OSTYPE)
mad_dict.o: CPPFLAGS += -D_VERSION_NUM=$(VERSION_NUM)
mad_gxx11c.o: CPPFLAGS += $(call incdir,/usr/X11/include /opt/X11/include) \
$(if $(call neq,$(X11),yes),,-D_USE_X11)
mad_gxx11c.o: CFLAGS += $(if $(call neq,$(CCNAME),icc),,-diag-disable 161) \
$(if $(call neq,$(CCNAME),gcc),,-Wno-variadic-macros)
mad_dict.o: CFLAGS += $(if $(call neq,$(CCNAME),gcc),,-Wno-overlength-strings)
# special dependency
mad_gcst.o: VERSION
#######################
# C dependencies (case not automatic!)
ifeq ($(CDEP),)
# all C object files depend on madx.h
%.o: madx.h
endif
# end of makefile