1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
systemd/libsysfs/Makefile
lethal@linux-sh.org b137e367bb [PATCH] udev/libsysfs cross compile fixes
I noticed that libsysfs doesn't inherently grab cross compilation arguments
that are set in the top-level Makefile, so I've come up with the following
patch to fix this. With the patch, I can succesfully cross compile for other
architectures (such as sh) by doing 'make ARCH=sh CROSS=sh-linux-' in the
top-level directory.
2005-04-26 21:01:40 -07:00

43 lines
1001 B
Makefile

# Makefile for libsysfs.a
# Copyright (c) International Business Machines Corp., 2003
H_INCLUDE=../include
LIB_INCLUDE=.
OBJS=sysfs_bus.o sysfs_class.o sysfs_device.o sysfs_dir.o sysfs_driver.o \
sysfs_utils.o
# Install directory
# Options
CFLAGS=-O2 -Wall -ansi -g
# sysfs library
LIBSYSFS=libsysfs.a
RM=rm -f
libsysfs.a: $(OBJS)
$(AR) cru $(LIBSYSFS) $(OBJS)
$(RANLIB) $(LIBSYSFS)
sysfs_bus.o: sysfs_bus.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_bus.c
sysfs_class.o: sysfs_class.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_class.c
sysfs_device.o: sysfs_device.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_device.c
sysfs_dir.o: sysfs_dir.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_dir.c
sysfs_driver.o: sysfs_driver.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_driver.c
sysfs_utils.o: sysfs_utils.c
$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_utils.c
clean:
$(RM) *.o *~ core $(LIBSYSFS)