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