Felisp
84436a5ae0
http://my.svgalib.org/svgalib/svgalib-1.9.25.tar.gz http://my.svgalib.org/svgalib/
34 lines
723 B
Makefile
34 lines
723 B
Makefile
CFLAGS = -g -Wall
|
|
RANLIB = ranlib
|
|
OS != uname -s
|
|
|
|
sources = lrmi.c lrmi.h
|
|
objects = lrmi.o
|
|
pic_objects = lrmi.lo
|
|
all = liblrmi.a liblrmi.so vbetest
|
|
.if ${OS}=="NetBSD" || ${OS}=="OpenBSD"
|
|
libs= -li386
|
|
.endif
|
|
|
|
all: $(all)
|
|
|
|
.c.o:
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o ${.TARGET} ${.IMPSRC}
|
|
|
|
.SUFFIXES: .lo
|
|
.c.lo:
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o ${.TARGET} ${.IMPSRC}
|
|
|
|
liblrmi.a: $(objects)
|
|
$(AR) -r ${.TARGET} ${.ALLSRC}
|
|
$(RANLIB) ${.TARGET}
|
|
|
|
liblrmi.so: $(pic_objects)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -o ${.TARGET} ${.ALLSRC} ${libs}
|
|
|
|
vbetest: vbetest.o liblrmi.a
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o ${.TARGET} ${.ALLSRC} ${libs}
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f $(objects) $(pic_objects) vbetest.o $(all) *.core
|