File: makefile.lib

package info (click to toggle)
mathomatic 14.0.6-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,108 kB
  • ctags: 659
  • sloc: ansic: 16,067; makefile: 160; python: 77; sh: 74
file content (42 lines) | stat: -rw-r--r-- 1,137 bytes parent folder | download
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
# Makefile for the Mathomatic symbolic math library and library test.
# Be sure to "make clean" between using different makefiles.

VERSION		= `cat VERSION`
CFLAGS		+= -O -DLIBRARY -DUNIX -DVERSION=\"$(VERSION)\" # C compiler flags
LDFLAGS		+= # linker flags
LIBS		+= -lm # libraries to link

prefix		?= /usr/local

AOUT		= mathomatic # The name of the library test executable file to create.
LIB		= libmathomatic.a # The name of the symbolic math library file to create.
HEADERS		= lib/mathomatic.h

OBJECTS		= lib/lib.o globals.o am.o solve.o help.o parse.o cmds.o simplify.o \
		  factor.o super.o unfactor.o poly.o diff.o integrate.o \
		  complex.o complex_lib.o list.o gcd.o factor_int.o

all: $(AOUT)
	@echo Make completed.

lib $(LIB): $(OBJECTS)
	ar cr $(LIB) $(OBJECTS)
	ranlib $(LIB)

$(OBJECTS): $(HEADERS) includes.h am.h externs.h complex.h proto.h VERSION

$(AOUT): lib/test.o $(LIB)
	$(CC) $(LDFLAGS) lib/test.o $(LIB) $(LIBS) -o $(AOUT)

install:
	install -m 0644 $(LIB) $(prefix)/lib
	install -m 0644 $(HEADERS) $(prefix)/include

clean:
	rm -f *.o
	rm -f lib/*.o

flush: clean
	rm -f $(AOUT)
	rm -f *.a
	rm -f lib/*.a