-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (48 loc) · 2.13 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
CC = gcc
CFLAGS = -Wall -O2
INCDIR = include
SRCDIR = source
TGT1 = libundxmgg_serial
RCGATYPE1 = UNDX_MGG_serial
TGT2 = librexstarjgg_serial
RCGATYPE2 = REXstar_JGG_serial
TGT3 = libundxmgg_parallel
RCGATYPE3 = UNDX_MGG_parallel
TGT4 = librexstarjgg_parallel
RCGATYPE4 = REXstar_JGG_parallel
all: lib/$(TGT1).a lib/$(TGT2).a lib/$(TGT3).a lib/$(TGT4).a
# ---------------- libundxmgg_serial.a ---------------- #
OBJS1 = $(SRCDIR)/$(RCGATYPE1).o $(SRCDIR)/Shared.o
PREREQS1 = $(SRCDIR)/$(RCGATYPE1).c $(SRCDIR)/Shared.c \
$(INCDIR)/$(RCGATYPE1).h $(INCDIR)/Shared.h
lib/$(TGT1).a: $(OBJS1)
(ar rcv lib/$(TGT1).a $(OBJS1); ranlib lib/$(TGT1).a)
$(SRCDIR)/$(RCGATYPE1).o: $(PREREQS1)
(cd $(SRCDIR); $(CC) $(CFLAGS) -I../$(INCDIR) -c $(RCGATYPE1).c)
# ---------------- librexstarjgg_serial.a ---------------- #
OBJS2 = $(SRCDIR)/$(RCGATYPE2).o $(SRCDIR)/Shared.o
PREREQS2 = $(SRCDIR)/$(RCGATYPE2).c $(SRCDIR)/Shared.c \
$(INCDIR)/$(RCGATYPE2).h $(INCDIR)/Shared.h
lib/$(TGT2).a: $(OBJS2)
(ar rcv lib/$(TGT2).a $(OBJS2); ranlib lib/$(TGT2).a)
$(SRCDIR)/$(RCGATYPE2).o: $(PREREQS2)
(cd $(SRCDIR); $(CC) $(CFLAGS) -I../$(INCDIR) -c $(RCGATYPE2).c)
# ---------------- libundxmgg_parallel.a ---------------- #
OBJS3 = $(SRCDIR)/$(RCGATYPE3).o $(SRCDIR)/Shared.o
PREREQS3 = $(SRCDIR)/$(RCGATYPE3).c $(SRCDIR)/Shared.c \
$(INCDIR)/$(RCGATYPE3).h $(INCDIR)/Shared.h
lib/$(TGT3).a: $(OBJS3)
(ar rcv lib/$(TGT3).a $(OBJS3); ranlib lib/$(TGT3).a)
$(SRCDIR)/$(RCGATYPE3).o: $(PREREQS3)
(cd $(SRCDIR); $(CC) $(CFLAGS) -I../$(INCDIR) -c $(RCGATYPE3).c)
# ---------------- librexstarjgg_parallel.a ---------------- #
OBJS4 = $(SRCDIR)/$(RCGATYPE4).o $(SRCDIR)/Shared.o
PREREQS4 = $(SRCDIR)/$(RCGATYPE4).c $(SRCDIR)/Shared.c \
$(INCDIR)/$(RCGATYPE4).h $(INCDIR)/Shared.h
lib/$(TGT4).a: $(OBJS4)
(ar rcv lib/$(TGT4).a $(OBJS4); ranlib lib/$(TGT4).a)
$(SRCDIR)/$(RCGATYPE4).o: $(PREREQS4)
(cd $(SRCDIR); $(CC) $(CFLAGS) -I../$(INCDIR) -c $(RCGATYPE4).c)
# ---------------- Shared.o ---------------- #
$(SRCDIR)/Shared.o: $(SRCDIR)/Shared.c $(INCDIR)/Shared.h
(cd $(SRCDIR); $(CC) $(CFLAGS) -I../$(INCDIR) -c Shared.c)