DEFINES= CFLAGS= -fPIC $(DEFINES) CC=gcc LDFLAGS=-G # SunOS4 settings #LFFLAGS=-assert pure text #LIBEXT=9.1 all: libq.so #main: main.o libq.so # $(CC) -o main main.o clean: rm -f main *.o *.so* core #run: run.o # $(CC) -o run run.o #run.o: os.h # $(CC) $(DEFINES) -c run.c #run.c: uname.h uname.h: Makefile @echo "# define UNAME `uname`" > uname.h @echo "# define MAJOR `uname -r | sed 's/\..*//'`" >> uname.h @echo "# define MINOR `uname -r | sed 's/[0-9]\.//'`" >> uname.h @echo "# define `uname`" >> uname.h SHOBJS=Stdio.o dlget.o libq.so: $(SHOBJS) Makefile -rm -f $@ $@.1$(LIBEXT) LD_LIBRARY_PATH='/usr/lib' ld $(LDFLAGS) -o $@ $(SHOBJS) -lc -ldl ln -s $@ $@.1$(LIBEXT) $(SHOBJS): os.h print.h os.h: uname.h