pi1541/tests/Makefile

34 lines
829 B
Makefile

SRCDIR = ../src
TESTDIR = .
SRCOBJS := net-utils.o net-arp.o net-ethernet.o
TESTOBJS := tests.o
OBJS := $(addprefix $(TESTDIR)/, $(TESTOBJS)) $(addprefix $(SRCDIR)/, $(SRCOBJS))
INCLUDE = -I../uspi/include/ -I..
CC := clang
CXX := clang++
AFLAGS += $(ARCH)
CFLAGS += $(ARCH) $(INCLUDE) -MMD -MP -Wall -Wno-psabi -fsigned-char -fno-builtin -g -DNDEBUG
CXXFLAGS := $(CFLAGS) $(CXXFLAGS) -std=c++11
CFLAGS += -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections -u _printf_float -std=gnu99
TARGET ?= test
DEPENDS := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPENDS)
.PHONY: all
all: $(TARGET)
./$(TARGET)
$(TARGET): $(OBJS)
@echo "$(OBJS)"
@echo " LINK $@"
$(Q)$(CXX) $(CFLAGS) -o $(TARGET) $(OBJS)
clean:
$(Q)$(RM) $(SRCDIR)/*.o $(TESTDIR)/*.o $(SRCDIR)/*.d $(TESTDIR)/*.d $(TARGET) kernel