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 | |
| 13 | UTILLINUX-:= |
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 |
| 31 | UTILLINUX-$(CONFIG_NFSMOUNT) +=nfsmount.o |
| 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 |
| 36 | UTILLINUX-$(CONFIG_UMOUNT) +=umount.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 37 | |
| 38 | libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) |
| 39 | |
| 40 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 41 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 42 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 43 | $(UTILLINUX_DIR)%.o: $(srcdir)/%.c |
| 44 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 45 | |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 46 | ifneq ($(strip $(CONFIG_LFS)),y) |
| 47 | ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y) |
| 48 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 49 | $(UTILLINUX_DIR)fdisk.o: $(srcdir)/fdisk.c |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 50 | $(CC) $(CFLAGS) \ |
| 51 | -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ |
| 52 | $(EXTRA_CFLAGS) -c -o $@ $< |
| 53 | |
| 54 | endif |
| 55 | endif |