X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=Makefile.common;h=205ef6b2ba5ae6d3940e55fe2cdb12f596b6154b;hb=fb5a31d1e731a1d3f1993063496277c979ce356e;hp=813901fa481844529694d95d09d9c3fc0219c5ba;hpb=e8f6b397420f9d862e37f667982a7807fb79a18d;p=simavr diff --git a/Makefile.common b/Makefile.common index 813901f..205ef6b 100644 --- a/Makefile.common +++ b/Makefile.common @@ -58,8 +58,18 @@ else AVR_ROOT := /usr/lib/avr AVR_INC := ${AVR_ROOT} AVR := avr- +ifeq (${shell uname -o}, Msys) +AVR_ROOT := ${shell echo "${AVR32_HOME}" | tr '\\' '/'} +AVR_INC := ${AVR_ROOT}/avr +AVR := ${AVR_ROOT}/bin/avr- +IPATH += ${PREFIX}/include +CFLAGS += -I${PREFIX}/include +LDFLAGS += -L/lib -L/local/lib +CFLAGS += -DNO_COLOR +else CFLAGS += -fPIC endif +endif CPPFLAGS += --std=gnu99 -Wall CPPFLAGS += ${patsubst %,-I%,${subst :, ,${IPATH}}} @@ -79,6 +89,10 @@ LDFLAGS += -L${LIBDIR} -lsimavr LDFLAGS += -lelf +ifeq (${shell uname -o}, Msys) +LDFLAGS += -lws2_32 +endif + ifeq (${shell uname}, Linux) ifeq ($(RELEASE),1) # allow the shared library to be found in the build directory