-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
139 lines (107 loc) · 2.72 KB
/
Makefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# SlickEdit generated file. Do not edit this file except in designated areas.
# Make command to use for dependencies
MAKE=make
RM=rm
MKDIR=mkdir
# -----Begin user-editable area-----
# -----End user-editable area-----
# If no configuration is specified, "Debug" will be used
ifndef CFG
CFG=Debug
endif
#
# Configuration: Debug
#
ifeq "$(CFG)" "Debug"
OUTDIR=Debug
OUTFILE=$(OUTDIR)/lsuio
CFG_INC=-I../uio_helper/src
CFG_LIB=/soc_dev/common/uio_helper/libuio_helper.lib
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/lsuio.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/lsuio.o \
/soc_dev/common/uio_helper/libuio_helper.lib
COMPILE="$(CROSS_COMPILE)gcc" -c -g -ggdb -Wall -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK="$(CROSS_COMPILE)gcc" -g -ggdb -Wall -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"
# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)
$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)
$(OUTDIR)/%.o : %.d
$(COMPILE_D)
$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)
$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)
$(OUTDIR)/%.o : %.f
$(COMPILE_F)
# Build rules
all: $(OUTFILE)
$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)
$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"
# Rebuild this project
rebuild: cleanall all
# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)
# Clean this project and all dependencies
cleanall: clean
endif
#
# Configuration: Release
#
ifeq "$(CFG)" "Release"
OUTDIR=Release
OUTFILE=$(OUTDIR)/lsuio
CFG_INC=-I../uio_helper/src
CFG_LIB=/soc_dev/common/uio_helper/libuio_helper.lib
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/lsuio.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/lsuio.o \
/soc_dev/common/uio_helper/libuio_helper.lib
COMPILE="$(CROSS_COMPILE)gcc" -c -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK="$(CROSS_COMPILE)gcc" -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"
# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)
$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)
$(OUTDIR)/%.o : %.d
$(COMPILE_D)
$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)
$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)
$(OUTDIR)/%.o : %.f
$(COMPILE_F)
# Build rules
all: $(OUTFILE)
$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)
$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"
# Rebuild this project
rebuild: cleanall all
# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)
# Clean this project and all dependencies
cleanall: clean
endif