Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | # General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | # |
| 19 | |
| 20 | UTILLINUX_AR:=util-linux.a |
| 21 | ifndef $(UTILLINUX_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 22 | UTILLINUX_DIR:=$(top_builddir)/util-linux/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 23 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 24 | srcdir=$(top_srcdir)/util-linux |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 25 | |
| 26 | UTILLINUX-:= |
Eric Andersen | 823b172 | 2004-05-26 11:50:37 +0000 | [diff] [blame] | 27 | UTILLINUX-$(CONFIG_DMESG) +=dmesg.o |
| 28 | UTILLINUX-$(CONFIG_FBSET) +=fbset.o |
| 29 | UTILLINUX-$(CONFIG_FDFLUSH) +=fdflush.o |
| 30 | UTILLINUX-$(CONFIG_FDFORMAT) +=fdformat.o |
| 31 | UTILLINUX-$(CONFIG_FDISK) +=fdisk.o |
| 32 | UTILLINUX-$(CONFIG_FREERAMDISK) +=freeramdisk.o |
| 33 | UTILLINUX-$(CONFIG_FSCK_MINIX) +=fsck_minix.o |
| 34 | UTILLINUX-$(CONFIG_GETOPT) +=getopt.o |
| 35 | UTILLINUX-$(CONFIG_HEXDUMP) +=hexdump.o |
| 36 | UTILLINUX-$(CONFIG_HWCLOCK) +=hwclock.o |
| 37 | UTILLINUX-$(CONFIG_LOSETUP) +=losetup.o |
| 38 | UTILLINUX-$(CONFIG_MKFS_MINIX) +=mkfs_minix.o |
| 39 | UTILLINUX-$(CONFIG_MKSWAP) +=mkswap.o |
| 40 | UTILLINUX-$(CONFIG_MORE) +=more.o |
| 41 | UTILLINUX-$(CONFIG_MOUNT) +=mount.o |
| 42 | UTILLINUX-$(CONFIG_NFSMOUNT) +=nfsmount.o |
| 43 | UTILLINUX-$(CONFIG_PIVOT_ROOT) +=pivot_root.o |
| 44 | UTILLINUX-$(CONFIG_RDATE) +=rdate.o |
| 45 | UTILLINUX-$(CONFIG_SWAPONOFF) +=swaponoff.o |
| 46 | UTILLINUX-$(CONFIG_UMOUNT) +=umount.o |
Paul Mundt | 8b2d02e | 2005-05-20 17:22:18 +0000 | [diff] [blame] | 47 | UTILLINUX-$(CONFIG_READPROFILE) +=readprofile.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 48 | |
| 49 | libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) |
| 50 | |
| 51 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
| 52 | $(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
| 53 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 54 | $(UTILLINUX_DIR)%.o: $(srcdir)/%.c |
| 55 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |
| 56 | |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 57 | ifneq ($(strip $(CONFIG_LFS)),y) |
| 58 | ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y) |
| 59 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 60 | $(UTILLINUX_DIR)fdisk.o: $(srcdir)/fdisk.c |
Eric Andersen | 42f8883 | 2004-05-26 11:59:19 +0000 | [diff] [blame] | 61 | $(CC) $(CFLAGS) \ |
| 62 | -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ |
| 63 | $(EXTRA_CFLAGS) -c -o $@ $< |
| 64 | |
| 65 | endif |
| 66 | endif |