contiki/cpu/cc2430/converter/Makefile
anthony-a dbdf9982a9 change bank assignments.
add missing header file.
add ihx converter
2010-01-26 02:37:51 +00:00

40 lines
678 B
Makefile

EXE_MAKE=$(notdir $(shell which "make.exe" 2>/dev/null))
ifeq "$(EXE_MAKE)" "make.exe"
PLATFORM=windows
else
PLATFORM=linux
endif
OBJECTS = ihex.o converter.o
SUBDIRS =
CFLAGS = -Wall -D_REENTRANT -I.
LDFLAGS = -L. -D_REENTRANT -lpthread
ifeq "$(PLATFORM)" "linux"
SUFFIX=
else
SUFFIX=.exe
endif
TARGET = converter$(SUFFIX)
all: binary
binary: $(TARGET)
strip $(TARGET)
$(TARGET): $(OBJECTS)
gcc -o $(TARGET) $(OBJECTS) $(LDFLAGS)
.c.o:
gcc -c -o $(<:.c=.o) -O2 -Wall $(CFLAGS) $<
platform-test:
@echo $(PLATFORM)
old-strip:
if [ -x $(TARGET).exe ]; then $(PLATFORM)strip $(TARGET).exe; else $(PLATFORM)strip $(TARGET); fi
clean:
rm -f $(TARGET) $(OBJECTS)