root / sollyaIntegration-4.0 / src / Makefile @ 36
Historique | Voir | Annoter | Télécharger (2,01 ko)
1 |
CC = gcc |
---|---|
2 |
CFLAGS = -Wall -g -I /warehouse/storres/root/include -I pobyso/src |
3 |
LDLIB = -L /warehouse/storres/root/lib -lsollya -lfplll -lmpfi -lmpfr -lgmp -lxml2 -lz -lstdc++ -lm -ldl #-Wl,--verbose |
4 |
|
5 |
OBJS = pobyso/src/pobyso.o |
6 |
INCS = pobyso/src/pobyso.h |
7 |
SOURCES = $(INCS) \ |
8 |
createObj-01.c \ |
9 |
taylorModel-01.c \ |
10 |
pobyso4/pobyso.c |
11 |
|
12 |
TEST_DRIVER = # CUnit test driver binary program |
13 |
TEST_DIR = test |
14 |
TEST_SOURCES = $(TEST_DIR)/$(TEST_DRIVER).c \ |
15 |
# Add the suites definition sources |
16 |
|
17 |
ALL_TARGETS = createObj-01 taylorModel-01 |
18 |
|
19 |
SCRATCH_PRG := $(patsubst %.c,%,$(wildcard *.c)) |
20 |
SCRATCH_ALL := $(SCRATCH_PRG) |
21 |
|
22 |
LAST_ARCH_FILE = lastArch.txt |
23 |
|
24 |
ARCH := $(shell uname -m) |
25 |
|
26 |
DUMMY := $(shell touch $(LAST_ARCH_FILE)) |
27 |
|
28 |
LAST_ARCH := $(shell cat $(LAST_ARCH_FILE)) |
29 |
|
30 |
ifneq ($(LAST_ARCH), $(ARCH)) |
31 |
DUMMY := $(shell echo $(ARCH) > $(LAST_ARCH_FILE)) |
32 |
DUMMY := $(shell $(MAKE) clean) |
33 |
endif |
34 |
|
35 |
ifeq (x86_64, $(ARCH)) |
36 |
CFLAGS := -m64 $(CFLAGS) |
37 |
# LDLIB := |
38 |
endif |
39 |
|
40 |
ifeq (ppc64, $(ARCH)) |
41 |
CFLAGS := -m64 $(CFLAGS) |
42 |
# LDLIB := |
43 |
endif |
44 |
|
45 |
ifeq (i686, $(ARCH)) |
46 |
# CFLAGS := $(CFLAGS) |
47 |
# LDLIB := |
48 |
endif |
49 |
|
50 |
# ------------------------------------------------------------------------- |
51 |
|
52 |
default: all |
53 |
# Remove all implicit (suffix) rules. No need to remove pattern rules. |
54 |
# Just redefine them. |
55 |
.SUFFIXES: |
56 |
# Keep the OBJS we want to link with user code. |
57 |
.PRECIOUS: $(OBJS) |
58 |
|
59 |
all: $(ALL_TARGETS) |
60 |
test: $(TEST_DRIVER) |
61 |
|
62 |
% : %.o $(OBJS) |
63 |
$(CC) $(CFLAGS) -o $@ $< $(OBJS) $(LDLIB) |
64 |
|
65 |
%.o : %.c $(INCS) |
66 |
$(CC) $(CFLAGS) -c -o $@ $< |
67 |
|
68 |
$(TEST_DRIVER) : |
69 |
make -C test |
70 |
cp test/$(TEST_DRIVER) . |
71 |
# ------------------------------------------------------------------------- |
72 |
|
73 |
.PHONY: clean scratch |
74 |
|
75 |
clean: |
76 |
@rm -f $(ALL_TARGETS) $(TEST_DRIVER) |
77 |
@rm -f *.o a.out $(OBJS) |
78 |
@rm -f *~ *% #*# |
79 |
@make -C $(TEST_DIR) clean |
80 |
@make -C pobyso clean |
81 |
|
82 |
scratch: clean |
83 |
rm -f $(SCRATCH_ALL) |
84 |
|
85 |
# Change the documentation configuration and path accordingly. |
86 |
documentation: pobyso.doxyconf $(SOURCES) |
87 |
doxygen pobyso.doxyconf |