diff --git a/libethernet/Makefile b/libethernet/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a0582e8176adc5a40c726caa1e3510dbde5ac748 --- /dev/null +++ b/libethernet/Makefile @@ -0,0 +1,22 @@ +CC = gcc +CFLAGS = -O2 -Wall -g + +objs_lib = ethernet.o + +ifeq ($(PLATFORM),BROADCOM) +objs_lib += bcm.o +else ifeq ($(PLATFORM),MEDIATEK) +objs_lib += ethsw.o +XXFLAGS += -Wl,-whole-archive -lsw -Wl,-no-whole-archive +endif + +all: libethernet.so + +%.o: %.c + $(CC) $(CFLAGS) -fPIC -c -o $@ $< + +libethernet.so: $(objs_lib) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(XXFLAGS) + +clean: + rm -f *.o *.so