# $Id: Makefile,v 1.3 2004/07/23 10:44:56 amo Exp $
ifndef COMPILING_WHOLE_TREE
TOPDIR:=$(shell pwd)
endif

include $(TOPDIR)/Rules.make
#PROGS     = memul get_ip
PROGS     = memul 

#MEMULOBJS  = modememul.o bt_misc.o get_ip.o
MEMULOBJS  = modememul.o bt_misc.o 

CFLAGS   += -MD

all:	$(PROGS)


#CC = arm-linux-gcc
#STRIP = arm-linux-strip

release : all
	install -d $(ROOT_FS_DIR)
	install -m 755 -o root -g root memul $(ROOT_FS_DIR)/usr/sbin/memuld
	#install -m 755 -o root -g root get_ip $(ROOT_FS_DIR)/usr/sbin/get_ip

memul:	$(MEMULOBJS)
	$(CC) -g $(LDFLAGS) $^ $(LDLIBS) -o $@
	$(STRIP) memul

get_ip: get_ip.o
	$(CC) -DTESTMODE -O2 -o get_ip get_ip.c 
	$(STRIP) get_ip

clean:
	rm -f $(PROGS) *.o *.d core

-include *.d
