Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: kagashe on June 06, 2009, 09:44:24 AM
-
Hi,
I am back (after about 6 months) on TC and would like to refresh my knowledge about compiling on TC.
I have uzbl on my mind which is webkit-gtk based browser with new concepts about what a browser should be.
The source is available on git but it does not have ./configure script. It is installed through 'make' and 'sudo make install' to /usr/bin which is not the policy of TC.
I find webkit.tcz on TC but is it webkit-gtk or qt? If it is webkit-gtk my task would be simple (I hope).
kagashe
-
I looked at that makefile and it appears that simply manually editing the make file to install into /usr/local is all that would be needed.
-
Please mark the changes required.
CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\""
LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0)
all: uzbl uzblctrl
test: uzbl
./uzbl --uri http://www.uzbl.org
test-config: uzbl
./uzbl --uri http://www.uzbl.org < examples/configs/sampleconfig-dev
test-config-real: uzbl
./uzbl --uri http://www.uzbl.org < /usr/share/uzbl/examples/configs/sampleconfig
clean:
rm -f uzbl
rm -f uzblctrl
install:
install -d $(DESTDIR)/usr/bin
install -d $(DESTDIR)/usr/share/uzbl/docs
install -d $(DESTDIR)/usr/share/uzbl/examples
install -D -m755 uzbl $(DESTDIR)/usr/bin/uzbl
install -D -m755 uzblctrl $(DESTDIR)/usr/bin/uzblctrl
cp -ax docs $(DESTDIR)/usr/share/uzbl/
cp -ax config.h $(DESTDIR)/usr/share/uzbl/docs/
cp -ax examples $(DESTDIR)/usr/share/uzbl/
install -D -m644 AUTHORS $(DESTDIR)/usr/share/uzbl/docs
install -D -m644 README $(DESTDIR)/usr/share/uzbl/docs
uninstall:
rm -rf $(DESTDIR)/usr/bin/uzbl
rm -rf $(DESTDIR)/usr/bin/uzblctrl
rm -rf $(DESTDIR)/usr/share/uzbl
kagashe
-
This command is an easy way to accomplish it for this file. Other makefiles may need a different approach depending what is in it.:
sed -i "s:/usr:/usr/local:g" make
It returned this:
CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\""
LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0)
all: uzbl uzblctrl
test: uzbl
./uzbl --uri http://www.uzbl.org
test-config: uzbl
./uzbl --uri http://www.uzbl.org < examples/configs/sampleconfig-dev
test-config-real: uzbl
./uzbl --uri http://www.uzbl.org < /usr/local/share/uzbl/examples/configs/sampleconfig
clean:
rm -f uzbl
rm -f uzblctrl
install:
install -d $(DESTDIR)/usr/local/bin
install -d $(DESTDIR)/usr/local/share/uzbl/docs
install -d $(DESTDIR)/usr/local/share/uzbl/examples
install -D -m755 uzbl $(DESTDIR)/usr/local/bin/uzbl
install -D -m755 uzblctrl $(DESTDIR)/usr/local/bin/uzblctrl
cp -ax docs $(DESTDIR)/usr/local/share/uzbl/
cp -ax config.h $(DESTDIR)/usr/local/share/uzbl/docs/
cp -ax examples $(DESTDIR)/usr/local/share/uzbl/
install -D -m644 AUTHORS $(DESTDIR)/usr/local/share/uzbl/docs
install -D -m644 README $(DESTDIR)/usr/local/share/uzbl/docs
uninstall:
rm -rf $(DESTDIR)/usr/local/bin/uzbl
rm -rf $(DESTDIR)/usr/local/bin/uzblctrl
rm -rf $(DESTDIR)/usr/local/share/uzbl
-
Hi!
I have a similar problem. I am new to this. It is the first time i am trying to make a extension. I want to make a extension for ebtables. The sourcecode is available on ebtables.sourceforge.net.
There is no configure file with the source.
I looked in the make file and there is a section there with:
# default paths
LIBDIR:=/usr/lib
MANDIR:=/usr/local/man
BINDIR:=/usr/local/sbin
ETCDIR:=/etc
INITDIR:=/etc/rc.d/init.d
SYSCONFIGDIR:=/etc/sysconfig
DESTDIR:=
CFLAGS:=-Wall -Wunused -Werror
CFLAGS_SH_LIB:=-fPIC -O3
CC:=gcc
I replaced DESTDIR= with DESTDIR=/usr/local. After this i tried to run make -j2.
I then got this error:
tc@box:~/ebtables-v2.0.10-4$ make -j2
gcc -Wall -Wunused -Werror -fPIC -O3 -DPROGVERSION=\"2.0.10-4\" -DPROGNAME=\"ebtables\" -DPROGDATE=\"December\ 2011\" -D_PATH_ETHERTYPES=\"/etc/ethertypes\" -DEBTD_ARGC_MAX=50 -DEBTD_CMDLINE_MAXLN=2048 -DLOCKFILE=\"/var/lib/ebtables/lock\" -DLOCKDIR=\"/var/lib/ebtables/\" -c -o communication.o communication.c -Iinclude/
gcc -Wall -Wunused -Werror -fPIC -O3 -DPROGVERSION=\"2.0.10-4\" -DPROGNAME=\"ebtables\" -DPROGDATE=\"December\ 2011\" -D_PATH_ETHERTYPES=\"/etc/ethertypes\" -DEBTD_ARGC_MAX=50 -DEBTD_CMDLINE_MAXLN=2048 -DLOCKFILE=\"/var/lib/ebtables/lock\" -DLOCKDIR=\"/var/lib/ebtables/\" -c -o extensions/ebt_802_3.o extensions/ebt_802_3.c -Iinclude/
communication.c: In function 'store_counters_in_file':
communication.c:259:58: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make: *** [communication.o] Error 1
make: *** Waiting for unfinished jobs....
tc@box:~/ebtables-v2.0.10-4$
Do you have any idea of whats wrong?
To get the Makefile correct is it enough to just change the DESTDIR? or is it something more?
regards,
rabtux
-
Remove "-Werror". The creators apparently use an older gcc and so haven't yet removed that unused variable.
Also, set DESTDIR to /tmp/package rather than usr/local so it's easy to package up.
-
..and, if you're planning to submit the extension, you might want to do something like this:
# default paths
LIBDIR:=/usr/local/lib
MANDIR:=/usr/local/man
BINDIR:=/usr/local/sbin
ETCDIR:=/usr/local/etc
INITDIR:=/usr/local/etc/rc.d/init.d
SYSCONFIGDIR:=/usr/local/etc/sysconfig
DESTDIR:=/tmp/pkg
CFLAGS:=-Wall -Wunused -march=i486 -mtune=i686 -Os -pipe
CFLAGS_SH_LIB:=-fPIC -Os
CC:=gcc
-
Thank you very much for your help :).
it works good so far. I have two network cards that is bridged and I am now able to block dhcp traffic between them :)
I will submit the extension soon.
regards,
rabtux