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

CC=gcc

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)