--- clipssrc/Makefile.orig 2008-03-11 19:35:38.000000000 -0700 +++ clipssrc/Makefile 2008-03-11 19:37:38.000000000 -0700 @@ -15,7 +15,7 @@ genrcpsr.o globlbin.o globlbsc.o globlcmp.o globlcom.o \ globldef.o globlpsr.o immthpsr.o incrrset.o inherpsr.o \ inscom.o insfile.o insfun.o insmngr.o insmoddp.o insmult.o \ - inspsr.o insquery.o insqypsr.o iofun.o lgcldpnd.o main.o \ + inspsr.o insquery.o insqypsr.o iofun.o lgcldpnd.o \ memalloc.o miscfun.o modulbin.o modulbsc.o modulcmp.o moduldef.o \ modulpsr.o modulutl.o msgcom.o msgfun.o msgpass.o msgpsr.o \ multifld.o multifun.o objbin.o objcmp.o objrtbin.o objrtbld.o \ @@ -28,14 +28,28 @@ tmpltbin.o tmpltbsc.o tmpltcmp.o tmpltdef.o tmpltfun.o tmpltlhs.o \ tmpltpsr.o tmpltrhs.o tmpltutl.o userdata.o userfunctions.o utility.o watch.o +SHLIB = libclips.so + .c.o : - gcc -c -Wall -Wundef -Wpointer-arith -Wshadow -Wcast-qual \ + $(GCC) $(CPPFLAGS) -c -fPIC -Wall -Wundef -Wpointer-arith -Wshadow -Wcast-qual \ -Wcast-align -Winline -Wmissing-declarations -Wredundant-decls \ -Wmissing-prototypes -Wnested-externs \ -Wstrict-prototypes -Waggregate-return -Wno-implicit $< -clips : $(OBJS) - gcc -o clips $(OBJS) -lm -ltermcap +clips : $(SHLIB) main.o + $(GCC) -o clips main.o -L. -lclips -lm -ltermcap $(LDFLAGS) + + +$(SHLIB): $(OBJS) + $(GCC) -shared -Wl,-soname,libclips.so -o $(SHLIB) $(OBJS) + +install: + install -d $(DESTDIR)/opt/bin/ + install clips $(DESTDIR)/opt/bin + $(STRIP) $(DESTDIR)/opt/bin/clips + install -d $(DESTDIR)/opt/lib/ + install $(SHLIB) $(DESTDIR)/opt/lib/ + $(STRIP) $(DESTDIR)/opt/lib/$(SHLIB) # Dependencies generated using "gcc -MM *.c" @@ -1252,4 +1266,4 @@ watch.o: watch.c setup.h envrnmnt.h usrsetup.h constant.h memalloc.h \ router.h prntutil.h moduldef.h conscomp.h constrct.h symbol.h \ userdata.h evaluatn.h expressn.h exprnops.h exprnpsr.h extnfunc.h \ - scanner.h pprint.h symblcmp.h modulpsr.h utility.h argacces.h watch.h \ No newline at end of file + scanner.h pprint.h symblcmp.h modulpsr.h utility.h argacces.h watch.h