summaryrefslogtreecommitdiff
path: root/libsysfs/Makefile
blob: b82acbdbf284d9068b4e335e18e18c6387e29a29 (plain)
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
# Makefile for libsysfs.a
# Copyright (c) International Business Machines Corp., 2003

H_INCLUDE=.
LIB_INCLUDE=.
OBJS=sysfs_bus.o sysfs_class.o sysfs_device.o sysfs_dir.o sysfs_driver.o \
	sysfs_utils.o dlist.o

# Install directory

# Options
CFLAGS=-O2 -Wall -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

dlist.o: dlist.c
	$(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c dlist.c

clean:
	$(RM) *.o *~ core $(LIBSYSFS)