Applied Bjorn Andersson's autoconf/automake patch. LCDproc is now built

with the standard "./autogen.sh && ./configure && make && make install"
instead of just tweaking the Makefile and typing "make".
This commit is contained in:
William Ferrell
1999-12-11 19:21:29 +00:00
parent 84272a2b12
commit 1f0e4679ab
17 changed files with 26 additions and 766 deletions
-39
View File
@@ -1,39 +0,0 @@
########################################################################
# You shouldn't need to touch anything below here.
########################################################################
include ../Makefile.config
DIRS = lcdproc
TARGETS = lcdproc/lcdproc
###################################################################
# Compilation...
#
all: $(TARGETS)
for i in $(DIRS); do \
(cd $$i; [ -f Makefile ] && $(MAKE) $@) \
done
##################################################################
# Installation
#
install: $(TARGETS)
@echo Installing LCD clients...
for i in $(DIRS); do \
(cd $$i; [ -f Makefile ] && $(MAKE) $@) \
done; true
##################################################################
# Other stuff...
#
clean:
for i in $(DIRS); do \
(cd $$i; [ -f Makefile ] && $(MAKE) $@) \
done; true
rm -f *.o *~ core
edit:
emacs . &
-41
View File
@@ -1,41 +0,0 @@
include ../../Makefile.config
########################################################################
# You shouldn't need to touch anything below here.
########################################################################
TARGET = lcdproc
OBJ = main.o mode.o batt.o chrono.o cpu.o disk.o load.o mem.o
LIB += -L../../shared -lLCDstuff
###################################################################
# Compilation...
#
all: $(TARGET)
$(TARGET): $(OBJ) Makefile
$(GCC) -s $(MISC) -o $(TARGET) $(OBJ) $(LIB)
%.o: %.c %.h Makefile
$(GCC) -c $(MISC) $<
##################################################################
# Installation
#
install: $(TARGET)
@echo ... lcdproc main client ...
install -m 0755 -o root -g root $(TARGET) /usr/local/bin/
##################################################################
# Other stuff...
#
clean:
rm -f $(OBJ) $(TARGET) *~ core
edit:
emacs . &
+4 -51
View File
@@ -4,6 +4,10 @@
#include <unistd.h>
#include <fcntl.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef LINUX
#include <sys/vfs.h>
#else
@@ -85,57 +89,6 @@ static int get_fs(mounts fs[])
return x;
}
#if 0
static int get_fs(mounts fs[])
{
struct statfs fsinfo;
char line[256];
int x = 0, y;
mtab_fd = fopen("/etc/mtab", "r");
// Get rid of old, unmounted filesystems...
memset(fs, 0, sizeof(mounts)*256);
while (x < 256)
{
if(fgets(line, 256, mtab_fd) == NULL)
{
fclose(mtab_fd);
return x;
}
sscanf(line, "%s %s %s", fs[x].dev, fs[x].mpoint, fs[x].type);
if( strcmp(fs[x].type, "proc")
#ifndef STAT_NFS
&& strcmp(fs[x].type, "nfs")
#endif
#ifndef STAT_SMBFS
&& strcmp(fs[x].type, "smbfs")
#endif
)
{
#ifdef LINUX
y = statfs(fs[x].mpoint, &fsinfo);
#else
y = statfs(fs[x].mpoint, &fsinfo, sizeof(fsinfo), 0);
#endif
fs[x].bsize = fsinfo.f_bsize;
fs[x].blocks = fsinfo.f_blocks;
fs[x].bfree = fsinfo.f_bfree;
fs[x].files = fsinfo.f_files;
fs[x].ffree = fsinfo.f_ffree;
x++;
}
}
fclose(mtab_fd);
return x;
}
#endif
int disk_init()
{
+4
View File
@@ -9,6 +9,10 @@
#include <signal.h>
#include <ctype.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "main.h"
#include "mode.h"
#include "../../shared/sockets.h"