summaryrefslogtreecommitdiff
path: root/libsysfs/Makefile
blob: 79cc53395932ffdb67e571135cac424956c4a28a (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
# 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)