[BACK]Return to Makefile CVS log [TXT][DIR] Up to [jp.NetBSD.org] / othersrc / mgl / mgl2 / ext

File: [jp.NetBSD.org] / othersrc / mgl / mgl2 / ext / Makefile (download)

Revision 1.1, Sun Apr 1 08:26:50 2001 UTC (16 years, 10 months ago) by suz
Branch: MAIN
CVS Tags: HEAD

*** empty log message ***

SRCDIR=../lib
#MGL_INSTALLED=y
include ../conf/config.mk
include ../conf/${OSTYPE}.mk

VER=2.0
REVISION=20.1

CFLAGS = -g -O $(USE_JPEG) $(USE_GIF) $(USE_PNG) \
		${INCS_MGL} $(JPEGINCDIR) $(GIFINCDIR) $(PNGINCDIR)
LIBS_EXT = ${LIBS_MGL} ${JPEGLIBDIR} ${JPEGLIB} ${GIFLIBDIR} ${GIFLIB} ${PNGLIBDIR} ${PNGLIB}

OBJS= exdraw.o imath.o libcode.o libmil.o memory_file.o

POBJS=$(OBJS:.o=.po) 
SOBJS=$(OBJS:.o=.xo)
SRCS=$(OBJS:.o=.c)

all: libmglext.so.${VER}

.SUFFIXES: .xo .po

.c.xo: 
	${CC} ${CFLAGS} ${MGLPIC_CFLAGS} -o $*.xo -c $*.c

.c.po: 
	${CC} ${CFLAGS} -o $*.po -p -c $*.c

libmglext.a : ${OBJS} 
	${AR} ruc libmglext.a ${OBJS} 
	ranlib libmglext.a

libmglext_p.a : ${POBJS}
	${AR} ruc libmglext.a ${POBJS}
	ranlib libmglext.a

libmglext.so.${VER} : ${SOBJS}
	${MGLPIC_LD} ${EXTPIC_LDFLAGS} -o libmglext.so.${VER}.${REVISION} ${SOBJS} ${LIBS_EXT}
	ln -sf libmglext.so.${VER}.${REVISION} libmglext.so.${VER} 
	ln -sf libmglext.so.${VER} libmglext.so

install: mglext.h mglmf.h libmglext.so.${VER} ${MGL_LIB_DIR} ${MGL_HEADER_DIR} ${MGLDIR}
	${INSTALL} -c -s ${PRIV_BIN} libmglext.so.${VER} ${MGL_LIB_DIR}
	(cd ${MGL_LIB_DIR}; ln -sf libmglext.so.${VER} libmglext.so)
	${INSTALL} -c ${PRIV_FILE} mglext.h ${MGL_HEADER_DIR}
	${INSTALL} -c ${PRIV_FILE} mglmf.h ${MGL_HEADER_DIR}

tst: tst.c
	${CC} ${CFLAGS} -o tst tst.c -lmglext ${LIBS_MGL} 
clean:
	rm -f *.xo *.o *.po libmglext.*