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 43 44
|
PREFIX=/usr/local
LOCALEDIR=/usr/share/locale
UNDO=-DLIBUNDO
ifdef LOCALEDIR
CFLAGS=-O2 `gtk-config --cflags` -DMENU -DLOCALEDIR=\"${LOCALEDIR}\" ${UNDO}
else
CFLAGS=-O2 `gtk-config --cflags` -DMENU -DDISABLE_NLS ${UNDO}
endif
CC=gcc
CP=/bin/cp
RM=/bin/rm -f
MAKE=make
SRCS = main.c chemproc.c graph.c draw.c inout.c gtkfilesel.c
OBJS = main.o chemproc.o graph.o draw.o inout.o gtkfilesel.o
ifdef UNDO
OBJS += undo.o
endif
SYS_LIBRARIES = `gtk-config --libs` -lm
all: chemtool cht
default: all
chemtool: ${OBJS}
${CC} ${OBJS} ${SYS_LIBRARIES} -o chemtool
cht: src-cht/cht-2.1.c
cd src-cht;${MAKE}
install: chemtool src-cht/cht
${CP} chemtool src-cht/cht ${PREFIX}/bin
${CP} chemtool.1 ${PREFIX}/man/man1
${CP} cht.1 ${PREFIX}/man/man1
ifdef LOCALEDIR
for L in `ls locales`; do ${CP} locales/$$L/chemtool.mo ${LOCALEDIR}/$$L/LC_MESSAGES;done
endif
clean:
${RM} *.o *~ src-cht/*.o src-cht/*~ chemtool src-cht/cht
|