Debian Codegraph @

legacy_sources/v2/Makefile

raw
1
2 # Shell commands
3
4 MKDIR = mkdir
5 RM = rm -f
6
7
8 # Definition of working directories
9
10 LIBNAME = libmesh.a
11 LIBDIR = $(HOME)/lib/$(ARCHI)
12 INCDIR = $(HOME)/include
13 OBJDIR = objects/$(ARCHI)
14 DIRS = objects $(LIBDIR) $(OBJDIR)
15
16
17 # Selection of the compiler and it's options depending on the architecture
18
19 ifeq ($(ARCHI),sparc)
20 CC = acc
21 CFLAGS = -O4 -c -I. -I$(INCDIR) -libmil -cg92
22 endif
23
24 ifeq ($(ARCHI),hppa)
25 CC = c89
26 CFLAGS = +O2 -c -I . -I $(INCDIR)
27 endif
28
29 ifeq ($(ARCHI),i86)
30 CC = gcc
31 CFLAGS = -mpentiumpro -O6 -c -I . -I $(INCDIR) -Wuninitialized -Wunused
32 endif
33
34 ifeq ($(ARCHI),rs6000)
35 CC = c89
36 CFLAGS = -O -c -I. -I$(INCDIR)
37 endif
38
39 ifeq ($(ARCHI),macintel)
40 CC = gcc
41 CFLAGS = -O3 -m64 -c -I. -I$(INCDIR)
42 endif
43
44 ifeq ($(ARCHI),macarm)
45 CC = gcc
46 CFLAGS = -O3 -m64 -c -I. -I$(INCDIR)
47 endif
48
49
50 # List of objects
51
52 OBJS = $(OBJDIR)/libmesh.o
53
54
55 # List of headers
56
57 INCS = *.h
58
59
60 # Making of the library
61
62 lib : $(DIRS) $(OBJS)
63 cp $(OBJS) $(LIBDIR)/$(LIBNAME)
64 cp $(INCS) $(INCDIR)
65
66
67 # Creation of objects
68
69 $(OBJDIR)/libmesh.o : libmesh.c
70 $(CC) $(CFLAGS) libmesh.c -o $@
71
72
73 # Creation of working directories
74
75 $(DIRS):
76 @[ -d $@ ] || $(MKDIR) $@
77
78
79 # Cleaning of the objects
80
81 clean:
82 $(RM) $(OBJS)
83