359618cd6e
here is a clean-up patch : * removes sg_err.[ch] deps * makes sure the core code play nice with klibc * port the sysfs calls to dlist helpers * links against udev's sysfs (need libsysfs.a & dlist.a) * finally define DM_TARGET as "multipath" as Joe posted the code today (not tested yet) * push version forward (do you want it in sync with udev version?) libdevmapper doesn't play well with klibc, so I wasn't able to produce a static binary yet. Help needed here ... as I don't want to fall back to merge libdevmapper code in the core. It compiles here and doesn't segfault.
34 lines
764 B
Makefile
34 lines
764 B
Makefile
# Makefile
|
|
#
|
|
# Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
|
|
|
|
EXEC = multipath
|
|
|
|
prefix = /usr/local
|
|
exec_prefix = ${prefix}
|
|
bindir = ${exec_prefix}/bin
|
|
|
|
CC = gcc
|
|
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc -I../../klibc/klibc/include -I../../klibc/klibc/include/bits32 -I/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/include -I../../klibc/linux/include -I../../libsysfs -I.
|
|
LDFLAGS = -lsysfs -ldevmapper -ldlist
|
|
|
|
OBJS = main.o
|
|
|
|
all: $(EXEC)
|
|
strip $(EXEC)
|
|
@echo ""
|
|
@echo "Make complete"
|
|
|
|
$(EXEC): $(OBJS)
|
|
$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS)
|
|
|
|
clean:
|
|
rm -f core *.o $(EXEC)
|
|
|
|
install:
|
|
install -d $(bindir)
|
|
install -m 755 $(EXEC) $(bindir)/
|
|
|
|
# Code dependencies
|
|
main.o: main.c main.h sg_include.h
|