More Makefile stuff

* Added lib directory; the library will live here
* Added Makefile fragment in the lib dir
* Modified README.directories to include the new dir
* Added lib directory to the fragments the Makefile uses


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@90 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1998-12-18 18:39:32 +00:00
1 parent 14116cf7fa
commit 52696a8d2d
5 files changed
+81 -8

No files matched your search

+8 -5
View File
@@ -95,7 +95,7 @@ LIBINCLUDEDIR := $(INCLUDEDIR)/sensors
# to do this.
# The subdirectories we need to build things in
SRCDIRS := src
SRCDIRS := src lib
ifeq ($(I2C),1)
SRCDIRS += i2c i2c/detect i2c/drivers i2c/eeprom
endif
@@ -104,13 +104,16 @@ endif
MKDIR := mkdir -p
RM := rm -f
CC := gcc
BISON := bison
FLEX := flex
AR := ar
# Determine the default compiler flags
# MODCFLAGS is to create in-kernel object files (modules); PROGFLAGS is to
# create non-kernel object files (which are linked into executables).
# ARCFLAGS are used to create archive object files (static libraries), and
# LIBCFLAGS are for shared library objects.
CFLAGS := -I. -Ii2c -O2 -D LM_SENSORS
CFLAGS := -I. -Ii2c -O2 -DLM_SENSORS
ifeq ($(DEBUG),1)
CFLAGS += -DDEBUG
@@ -208,6 +211,9 @@ version:
sed -e 's@^\(.*\)\.o:@$*.rd $*.ro Makefile '`dirname $*.rd`/Module.mk':@' > $@
%: %.ro
$(CC) $(EXLDFLAGS) -o $@ $^
# .ao files are used for static archives
%.ao: %.c
@@ -226,9 +232,6 @@ version:
$(CC) -M -MG $(LIBCFLAGS) $< | \
sed -e 's@^\(.*\)\.o:@$*.ld $*.lo Makefile '`dirname $*.ld`/Module.mk':@' > $@
%: %.ro
$(CC) $(EXLDFLAGS) -o $@ $^
# Flex and Bison
%c: %y