summaryrefslogtreecommitdiff
blob: 50370b3c27845064b1c64412157a40336dd61c05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
VERSION = GENTOOVERSION
MAJOR = 1

LIBS = -lgfortran -lf2c

objects := $(patsubst %.f,%.o,$(wildcard *.f))

all: libgmxmopac7

clean:
	 rm -f moldat.*f deriv.* mopac7*.* compfg.* dcart.*

%.o: %.f
	$(FC) $(FFLAGS) -fPIC -c $<

libgmxmopac7: $(objects)
	$(FC) -shared $(LDFLAGS) -Wl,-soname,libgmxmopac7.so.$(MAJOR) -o $@.so.$(VERSION) $^ $(LIBS)
	ln -sf $@.so.$(VERSION) libgmxmopac7.so

static: $(objects)
	ar rcv libgmxmopac7.a *.o
	ranlib libgmxmopac7.a