Tests for BSDInterface

Dependencies:   BSDInterface NetworkSocketAPI NSAPITests

Makefile

Committer:
Christopher Haster
Date:
2016-02-25
Revision:
2:3515c4f23398

File content as of revision 2:3515c4f23398:

# This file was automagically generated by mbed.org. For more information, 
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded

GCC_BIN = 
PROJECT = BSDInterfaceTests
OBJECTS = ./main.o ./NetworkSocketAPI/NetworkInterface.o ./NetworkSocketAPI/Socket.o ./NetworkSocketAPI/DnsQuery/DnsQuery.o ./BSDInterface/BSDInterface.o ./NSAPITests/NSAPITests.o
SYS_OBJECTS = 
INCLUDE_PATHS = -I. -I./NetworkSocketAPI -I./NetworkSocketAPI/DnsQuery -I./BSDInterface -I./NSAPITests
LIBRARY_PATHS = 
LIBRARIES = 
LINKER_SCRIPT = None

############################################################################### 
AS      = $(GCC_BIN)as
CC      = $(GCC_BIN)gcc
CPP     = $(GCC_BIN)g++
LD      = $(GCC_BIN)g++
OBJCOPY = $(GCC_BIN)objcopy
OBJDUMP = $(GCC_BIN)objdump
SIZE    = $(GCC_BIN)size 

CC_FLAGS = -c -g -Wall -MMD -MP


ifeq ($(DEBUG), 1)
  CC_FLAGS += -DDEBUG -O0
else
  CC_FLAGS += -DNDEBUG -Os
endif

.PHONY: all clean lst size

all: $(PROJECT) size


clean:
	rm -f $(PROJECT) $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)


.asm.o:
	$(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<
.s.o:
	$(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<
.S.o:
	$(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<

.c.o:
	$(CC)  $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<

.cpp.o:
	$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<



$(PROJECT): $(OBJECTS) $(SYS_OBJECTS)
	$(LD) $(LD_FLAGS) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)


$(PROJECT).elf: $(PROJECT)
	cp $< $@

$(PROJECT).bin: $(PROJECT).elf
	$(OBJCOPY) -O binary $< $@

$(PROJECT).hex: $(PROJECT).elf
	@$(OBJCOPY) -O ihex $< $@

$(PROJECT).lst: $(PROJECT).elf
	@$(OBJDUMP) -Sdh $< > $@

lst: $(PROJECT).lst

size: $(PROJECT)
	$(SIZE) $(PROJECT)

DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
-include $(DEPS)