Commit 78dd040d authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: moved rtu_stat and test_rtu from ../on-switch-tests

parent e9ec1714
include ../../../Makedefs
CC=$(CROSS_COMPILE_ARM)gcc
OBJS = rtu_stat.o
LDFLAGS = -lswitchhw -L../../libswitchhw -L../../libwripc -L../../libptpnetif -lwripc -lptpnetif
CFLAGS = -I. -O2 -I../../include -DDEBUG -I../../../kernel/include -I../../libptpnetif -I../../wrsw_hal -I../../libwripc -I../../wrsw_rtud -g
OUTPUT = rtu_stat
all: $(OBJS)
make -C ../../libswitchhw
${CC} -o $(OUTPUT) $(OBJS) $(LDFLAGS)
%.o: %.c
${CC} -c $^ $(CFLAGS)
run: all
- scp $(OUTPUT) root@192.168.1.16:/tmp
- scp $(OUTPUT) root@192.168.1.13:/tmp
install: all
mkdir -p ../../rootfs_override/root/tests
cp $(OUTPUT) ../../rootfs_override/root/tests
clean:
rm -f $(OUTPUT) $(OBJS)
deploy: all
scp $(OUTPUT) $(WR_INSTALL_ROOT)/bin
\ No newline at end of file
CC=$(CROSS_COMPILE)gcc
OBJS = rtu_sim.o rtu_hw.o rtu_test.o rtu_common.o rtu_test_data.o rtu_test_main.o
LDFLAGS = -lswitchhw -L../../libswitchhw
CFLAGS = -I. -O2 -I../../include -DDEBUG
OUTPUT = rtu_sim
all: $(OBJS)
${CC} -o $(OUTPUT) $(OBJS) $(LDFLAGS)
%.o: %.c
${CC} -c $^ $(CFLAGS)
run:: all
scp $(OUTPUT) root@$(T):/tmp
- ssh -t root@$(T) "/tmp/$(OUTPUT)"
clean:
rm -f $(OUTPUT) $(OBJS)
\ No newline at end of file
wrsw_hal/wrsw_hal
wrsw_rtud/wrsw_rtud
spll_dbg_proxy/spll_dbg_proxy
wr_mon/wr_mon
rtu_stat/rtu_stat
......@@ -15,7 +15,7 @@ WRDEV_DIR ?= $(WRS_BASE_DIR)/..
# subdirectories we want to compile
SUBDIRS = libswitchhw libwripc libptpnetif
SUBDIRS += wrsw_hal wrsw_rtud spll_dbg_proxy
SUBDIRS += wr_mon #rtu_stat
SUBDIRS += wr_mon rtu_stat #test_rtu
# all variables are exported
export
......
# # Standard stanza for cross-compilation (courtesy of the linux makefile)
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
OBJS = rtu_stat.o
CFLAGS = -O2 -I../include -DDEBUG -I$(LINUX)/include -I../libptpnetif \
-I../wrsw_hal -I../libwripc -I../wrsw_rtud -g
LDFLAGS = -L$(WR_INSTALL_ROOT)/lib -lptpnetif -lwripc -lswitchhw
BINARY = rtu_stat
all: $(BINARY)
$(BINARY): $(OBJS)
${CC} $^ $(LDFLAGS) -o $@
clean:
rm -f $(BINARY) *.o *~
install:
install -d $(WR_INSTALL_ROOT)/bin
install $(BINARY) $(WR_INSTALL_ROOT)/bin
# local deprecated rules follow, don't use
run: all
- scp $(BINARY) root@192.168.1.16:/tmp
- scp $(BINARY) root@192.168.1.13:/tmp
deploy: all
scp $(BINARY) $(WR_INSTALL_ROOT)/bin
\ No newline at end of file
CC=$(CROSS_COMPILE)gcc
WR_INSTALL_ROOT ?= $(WRS_OUTPUT_DIR)/images/wr
OBJS = rtu_sim.o rtu_hw.o rtu_test.o rtu_common.o \
rtu_test_data.o rtu_test_main.o
LDFLAGS = -L$(WR_INSTALL_ROOT)/lib -lswitchhw
CFLAGS = -I. -O2 -I../include -DDEBUG
BINARY = rtu_sim
all: $(OBJS)
${CC} -o $(BINARY) $(OBJS) $(LDFLAGS)
clean:
rm -f $(BINARY) *.o *~
install:
install -d $(WR_INSTALL_ROOT)/bin
install $(BINARY) $(WR_INSTALL_ROOT)/bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment