Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
| 7 | UTILLINUX_AR:=util-linux.a |
| 8 | ifndef $(UTILLINUX_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | UTILLINUX_DIR:=$(top_builddir)/util-linux/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/util-linux |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 12 | |
Bernhard Reutner-Fischer | bb66a6c | 2005-10-13 10:24:44 +0000 | [diff] [blame] | 13 | UTILLINUX-y:= |
Mike Frysinger | 95544f7 | 2005-09-25 05:23:58 +0000 | [diff] [blame] | 14 | UTILLINUX-$(CONFIG_DMESG) +=dmesg.o |
| 15 | UTILLINUX-$(CONFIG_FBSET) +=fbset.o |
| 16 | UTILLINUX-$(CONFIG_FDFLUSH) +=fdflush.o |
| 17 | UTILLINUX-$(CONFIG_FDFORMAT) +=fdformat.o |
| 18 | UTILLINUX-$(CONFIG_FDISK) +=fdisk.o |
| 19 | UTILLINUX-$(CONFIG_FREERAMDISK) +=freeramdisk.o |
| 20 | UTILLINUX-$(CONFIG_FSCK_MINIX) +=fsck_minix.o |
| 21 | UTILLINUX-$(CONFIG_GETOPT) +=getopt.o |
| 22 | UTILLINUX-$(CONFIG_HEXDUMP) +=hexdump.o |
| 23 | UTILLINUX-$(CONFIG_HWCLOCK) +=hwclock.o |
| 24 | UTILLINUX-$(CONFIG_IPCRM) +=ipcrm.o |
| 25 | UTILLINUX-$(CONFIG_IPCS) +=ipcs.o |
| 26 | UTILLINUX-$(CONFIG_LOSETUP) +=losetup.o |
| 27 | UTILLINUX-$(CONFIG_MKFS_MINIX) +=mkfs_minix.o |
| 28 | UTILLINUX-$(CONFIG_MKSWAP) +=mkswap.o |
| 29 | UTILLINUX-$(CONFIG_MORE) +=more.o |
| 30 | UTILLINUX-$(CONFIG_MOUNT) +=mount.o |
Rob Landley | 4a7252b | 2005-10-08 18:49:45 +0000 | [diff] [blame] | 31 | UTILLINUX-$(CONFIG_FEATURE_MOUNT_NFS) +=nfsmount.o |
Mike Frysinger | 95544f7 | 2005-09-25 05:23:58 +0000 | [diff] [blame] | 32 | UTILLINUX-$(CONFIG_PIVOT_ROOT) +=pivot_root.o |
| 33 | UTILLINUX-$(CONFIG_RDATE) +=rdate.o |
| 34 | UTILLINUX-$(CONFIG_READPROFILE) +=readprofile.o |
| 35 | UTILLINUX-$(CONFIG_SWAPONOFF) +=swaponoff.o |
"Vladimir N. Oleynik" | ea97282 | 2005-10-28 15:43:41 +0000 | [diff] [blame^] | 36 | UTILLINUX-$(CONFIG_SWITCH_ROOT) +=switch_root.o |
Mike Frysinger | 95544f7 | 2005-09-25 05:23:58 +0000 | [diff] [blame] | 37 | UTILLINUX-$(CONFIG_UMOUNT) +=umount.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 38 | |
| 39 | libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) |
| 40 | |
| 41 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 42 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 43 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 44 | $(UTILLINUX_DIR)%.o: $(srcdir)/%.c |
| 45 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 46 | |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 47 | ifneq ($(strip $(CONFIG_LFS)),y) |
| 48 | ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y) |
| 49 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 50 | $(UTILLINUX_DIR)fdisk.o: $(srcdir)/fdisk.c |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 51 | $(CC) $(CFLAGS) \ |
| 52 | -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ |
| 53 | $(EXTRA_CFLAGS) -c -o $@ $< |
| 54 | |
| 55 | endif |
| 56 | endif |