1# 2# Author: Noel V Aguilar 3# CGI-LIB Library 4# Release 1.4 5# 6# This library is free softare; you can redistribute it 7# and/or modify it. 8# 9# You can compile this library by simply running 'make' 10# and then copy the cgi-lib.a to the your lib directory 11# and the cgi-lib.h and html-lib.h files into your 12# include directory manually. This will allow the linker 13# to automatically include the library or you can copy the 14# files to where your development is being done and link it 15# manually. 16# 17# For updates or to report bugs please go to: 18# http://www.geocities.com/SiliconValley/Vista/6493/ 19# 20# This library is distributed in the hope that it will be 21# useful but WITHOUT ANY WARRANTY; without even the implied 22# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 23:wq 24:# PURPOSE. 25# 26 27CGI-LIB=cgi-lib.a 28# CC=gcc 29CFLAGS +=-fPIC -Wall -c 30# AR=ar 31ARFLAGS=rc 32objs=cgi-lib.o html-lib.o list-lib.o 33 34 35COMM-LIB-PATH = ../lib 36COMM-INC-PATH = ../include 37TARGET-LIB=../../target/usr/lib 38 39#all: $(CGI-LIB) 40# 41#$(CGI-LIB): $(OBJS) 42# @echo Building library 43# $(AR) $(ARFLAGS) $@ $(OBJS) 44# @echo Building complete 45all: cgilib 46 47cgi-lib.o: cgi-lib.c cgi-lib.h cgi-priv.h 48 $(CC) $(CFLAGS) cgi-lib.c 49 50html-lib.o: html-lib.c html-lib.h 51 $(CC) $(CFLAGS) html-lib.c 52 53list-lib.o: list-lib.c list-lib.h 54 $(CC) $(CFLAGS) list-lib.c 55 56cgilib: $(objs) 57 $(CC) -shared -Wl,-soname,libcgi.so.0 -o libcgi.so.0.0 $(objs) 58 arm-linux-strip libcgi.so.0.0 59 ln -sf libcgi.so.0.0 libcgi.so.0 60 ln -sf libcgi.so.0 libcgi.so 61 cp -afv libcgi* $(COMM-LIB-PATH) 62 cp -f cgi-lib.h $(COMM-INC-PATH) 63 cp -f html-lib.h $(COMM-INC-PATH) 64 cp -f list-lib.h $(COMM-INC-PATH) 65 66clean: 67 echo Cleaning up 68 rm -f *.o 69 rm -f libcgi* 70 rm -f $(COMM-LIB-PATH)/libcgi* 71 rm -f $(COMM-INC-PATH)/cgi-lib.h 72 rm -f $(COMM-INC-PATH)/html-lib.h 73 rm -f $(COMM-INC-PATH)/list-lib.h 74 75romfs: 76 $(ROMFSINST) libcgi.so.0.0 /lib 77 $(ROMFSINST) -s libcgi.so.0.0 /lib/libcgi.so.0 78 $(ROMFSINST) -s libcgi.so.0 /lib/libcgi.so 79# install: 80# mkdir -p $(TARGET-LIB) 81# cp -pdR $(COMM-LIB-PATH)/libcgi* $(TARGET-LIB) 82 83