* Merged newxml into HEAD
[linux_from_scratch.git] / lfscmd / Makefile
blob8f46b2546af80aa18d2a1eaabca299c1df76bbe5
1 CC=gcc
2 CFLAGS=-I/usr/include/libxml2 -W -Wall -Os
3 LIBS=-lxml2 -lz -lm -s
4 PREFIX=/usr
5 LDFLAGS=
7 OBJS= env.o \
8 file.o \
9 help.o \
10 lfscmd.o \
11 main.o \
12 string.o
14 all: lfscmd
16 lfscmd: env.o file.o help.o lfscmd.o main.o string.o
17 $(CC) env.o file.o help.o lfscmd.o main.o string.o $(LDFLAGS) -o lfscmd $(CFLAGS) $(LIBS)
19 install: lfscmd
20 if ( test ! -d $(PREFIX)/bin ); then mkdir -p $(PREFIX)/bin; fi
21 if ( test ! -d $(PREFIX)/share/man/man1 ); then mkdir -p $(PREFIX)/share/man/man1; fi
22 cp -f lfscmd $(PREFIX)/bin/lfscmd
23 cp -f doc/lfscmd.1 $(PREFIX)/share/man/man1/lfscmd.1
24 chmod a+x $(PREFIX)/bin/lfscmd
25 chmod a+r $(PREFIX)/share/man/man1/lfscmd.1
27 clean: cleanup
28 cleanup:
29 rm -f *.o lfscmd
31 uninstall: remove
32 remove:
33 rm -f $(PREFIX)/bin/lfscmd
34 rm -f $(PREFIX)/share/man/man1/lfscmd.1
36 env.o: src/env.c
37 $(CC) $(CFLAGS) -c src/env.c
38 file.o: src/file.c
39 $(CC) $(CFLAGS) -c src/file.c
40 help.o: src/help.c
41 $(CC) $(CFLAGS) -c src/help.c
42 lfscmd.o: src/lfscmd.c
43 $(CC) $(CFLAGS) -c src/lfscmd.c
44 main.o: src/main.o
45 $(CC) $(CFLAGS) -c src/main.c
46 string.o: src/string.c
47 $(CC) $(CFLAGS) -c src/string.c