Debian Codegraph @

src/ecos/external/amd/Makefile

raw
1 #-------------------------------------------------------------------------------
2 # AMD Makefile for compiling on Unix systems (for GNU make only)
3 #-------------------------------------------------------------------------------
4
5 default: libamd.a
6
7 include ../../ecos.mk
8
9 C = $(CC) $(CFLAGS) -Iinclude -I../SuiteSparse_config
10
11 #-------------------------------------------------------------------------------
12 # source files
13 #-------------------------------------------------------------------------------
14
15 AMD = amd_aat amd_1 amd_2 amd_dump amd_postorder amd_post_tree amd_defaults \
16 amd_order amd_control amd_info amd_valid amd_preprocess
17
18 CONFIG = ../SuiteSparse_config/SuiteSparse_config.h
19
20 INC = include/amd.h include/amd_internal.h $(CONFIG)
21
22 #-------------------------------------------------------------------------------
23 # object files for each version
24 #-------------------------------------------------------------------------------
25
26 AMDI = $(addsuffix .o, $(subst amd_,amd_i_,$(AMD)))
27 AMDL = $(addsuffix .o, $(subst amd_,amd_l_,$(AMD)))
28
29 #-------------------------------------------------------------------------------
30 # compile each int and long routine (with no real/complex version)
31 #-------------------------------------------------------------------------------
32
33 amd_global.o: src/amd_global.c $(INC)
34 $(C) -c $< -o $@
35
36 amd_i_%.o: src/amd_%.c $(INC)
37 $(C) -DDINT -c $< -o $@
38
39 amd_l_%.o: src/amd_%.c $(INC)
40 $(C) -DDLONG -c $< -o $@
41
42 #-------------------------------------------------------------------------------
43 # Create the libamd.a library (C versions only)
44 #-------------------------------------------------------------------------------
45
46 libamd.a: amd_global.o $(AMDI) $(AMDL)
47 $(ARCHIVE) libamd.a $^
48 - $(RANLIB) libamd.a
49
50 #-------------------------------------------------------------------------------
51 # Remove all but the files in the original distribution
52 #-------------------------------------------------------------------------------
53
54 clean:
55 - $(RM) $(CLEAN)
56
57 purge:
58 - $(RM) libamd.a libamdf77.a
59