Makefile 821 Bytes
#

PRDEPTH = ../../..
include $(PRDEPTH)/PRdefs

IOSIMLIB	= ../libiosim.a

TARGETS = mi_test mi_random mi_rng mi_intr_test

CFILES	= mi_test.c nvram_test.c

#
# C Flags
#
LCINCS	= -I. -I$(ROOT)/usr/include -I.. -D_LANGUAGE_C
# possible -D defines: DEBUG, CHATTY
LCOPTS	= -g -DDEBUG -DBCP_IPC -Wall
LCFLAGS = $(LCOPTS) $(LCINCS)

#
# Linker Flags
#
LLDLIBS	= $(IOSIMLIB)

default: $(TARGETS)

include $(COMMONRULES)

mi_test: main.o $(OBJECTS) $(IOSIMLIB)
	$(HOST_CC) -o $@ $^ $(LLDLIBS)

nvram_test: $(OBJECTS) $(IOSIMLIB)
	$(HOST_CC) -o $@ $^ $(LLDLIBS)

mi_random: mi_random.o mi_test.o nvram_test.o $(IOSIMLIB)
	$(HOST_CC) -o $@ $^ $(LLDLIBS)

mi_rng: rand_test.o
	$(HOST_CC) -o $@ $^ $(LLDLIBS)

mi_intr_test: mi_intr_test.o $(OBJECTS) $(IOSIMLIB)
	$(HOST_CC) -o $@ $^ $(LLDLIBS)

.c.o:
	$(HOST_CC) $(LCFLAGS) -c $<