1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# Makefile for busybox
#
# Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
MODUTILS_OBJ_AR:=obj.a
ifndef $(MODUTILS_OBJ_DIR)
MODUTILS_OBJ_DIR:=$(TOPDIR)modutils/obj/
endif
CFLAGS_MODUTILS_ALL = -I$(TOPDIR)modutils/obj
CFLAGS_MODUTILS = -DELF_MACHINE_H='"elf_$(host_cpu_modutils).h"' -DARCH_$(host_cpu_modutils)
ifneq ($(host_cpu_modutils_biarch),)
CFLAGS_MODUTILS += -DCOMMON_3264 -DONLY_32
CFLAGS_MODUTILS_64 = -DELF_MACHINE_H='"elf_$(host_cpu_modutils_biarch).h"' -DARCH_$(host_cpu_modutils_biarch)
CFLAGS_MODUTILS_64 += -DCOMMON_3264 -DONLY_64
endif
MODUTILS_OBJ-$(CONFIG_MODUTILS_OBJ) += \
depmod.o \
insmod.o \
modstat.o \
obj_$(host_cpu_modutils).o \
obj_kallsyms.o \
obj_common.o \
obj_load.o \
obj_reloc.o \
obj_gpl_license.o \
util.o
ifneq ($(host_cpu_modutils_biarch),)
MODUTILS_OBJ-$(CONFIG_MODUTILS_OBJ) += \
depmod_64.o \
insmod_64.o \
obj_$(host_cpu_modutils_biarch)_64.o \
obj_kallsyms_64.o \
obj_common_64.o \
obj_load_64.o \
obj_reloc_64.o \
obj_gpl_license_64.o
endif
libraries-y+=$(MODUTILS_OBJ_DIR)$(MODUTILS_OBJ_AR)
$(MODUTILS_OBJ_DIR)$(MODUTILS_OBJ_AR): $(patsubst %,$(MODUTILS_OBJ_DIR)%, $(MODUTILS_OBJ-y))
$(AR) -ro $@ $(patsubst %,$(MODUTILS_OBJ_DIR)%, $(MODUTILS_OBJ-y))
$(MODUTILS_OBJ_DIR)%.o: $(MODUTILS_OBJ_DIR)%.c
$(CC) $(CFLAGS) $(CFLAGS_MODUTILS_ALL) $(CFLAGS_MODUTILS) $(EXTRA_CFLAGS) -c -o $@ $<
$(MODUTILS_OBJ_DIR)%_64.o: $(MODUTILS_OBJ_DIR)%.c
$(CC) $(CFLAGS) $(CFLAGS_MODUTILS_ALL) $(CFLAGS_MODUTILS_64) $(EXTRA_CFLAGS) -c -o $@ $<
|