1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
# Makefile for tleds and xtleds.
# GNU GPL (c) 1997, 1998 Jouni.Lohikoski@iki.fi
all: tleds xtleds say_install
# Where to install programs and man pages
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/sbin/
MANDIR = $(PREFIX)/share/man/
# For 21.x kernels, you have to include -DKERNEL2_1 option for gcc
GCCOPTS = -D_GNU_SOURCE -O3 -Wall
# The first one is if you want to include X code
xtleds: tleds.c Makefile
# Making xtleds
gcc $(GCCOPTS) -o xtleds_20 tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
gcc -DKERNEL2_1 $(GCCOPTS) -o xtleds_21 tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
# This second one works only when started in VT. Check the REMOVE_X_CODE
# in the source code.
tleds: tleds.c Makefile
# Making tleds
gcc -DNO_X_SUPPORT $(GCCOPTS) -o tleds_20 tleds.c
gcc -DNO_X_SUPPORT -DKERNEL2_1 $(GCCOPTS) -o tleds_21 tleds.c
help:
# make help - this.
# make tleds - makes tleds.
# make xtleds - makes xtleds.
# make strip - strips them.
# make install - installs tleds, xtleds and tleds man page
# if EUID root.
# make all - make tleds and xtleds
strip:
strip --strip-all tleds_20
strip --strip-all tleds_21
say_install:
# Now su root and run: make install
# If you want to strip them first, say: make strip install
install:
# EUID root needed !
# installing ....
# If you get an error here, you are not root or may have tleds running
# on the system. tleds -k first and then make install again as root.
install -s -o root -g root -m 754 tleds_20 $(BINDIR)/tleds_20
install -s -o root -g root -m 754 tleds_21 $(BINDIR)/tleds_21
sync
# ....Done.
|