|
@ -17,9 +17,11 @@ STRIP = avr-strip |
|
|
HOSTCC := gcc |
|
|
HOSTCC := gcc |
|
|
export HOSTCC |
|
|
export HOSTCC |
|
|
|
|
|
|
|
|
|
|
|
LIBS = -lm |
|
|
|
|
|
|
|
|
# flags for the compiler
|
|
|
# flags for the compiler
|
|
|
CFLAGS ?= -Wall -W -Wno-unused-parameter -Wno-sign-compare |
|
|
CFLAGS ?= -Wall -W -Wno-unused-parameter -Wno-sign-compare |
|
|
CFLAGS += -g -Os -std=gnu99 -fgnu89-inline -DNDEBUG |
|
|
CFLAGS += -g -Os -std=gnu99 -fgnu89-inline -D_XOPEN_SOURCE=600 -DNDEBUG |
|
|
|
|
|
|
|
|
# flags for the linker
|
|
|
# flags for the linker
|
|
|
LDFLAGS += -T ./avr5.x -Wl,-Map,image.map -mmcu=$(MCU) |
|
|
LDFLAGS += -T ./avr5.x -Wl,-Map,image.map -mmcu=$(MCU) |
|
@ -33,17 +35,17 @@ MACHINE = $(shell uname -m) |
|
|
#$(info $(OSTYPE))
|
|
|
#$(info $(OSTYPE))
|
|
|
|
|
|
|
|
|
ifeq ($(OSTYPE),cygwin) |
|
|
ifeq ($(OSTYPE),cygwin) |
|
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_WIN32 -mno-cygwin |
|
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_WIN32 -mno-cygwin -D_XOPEN_SOURCE=600 |
|
|
LDFLAGS_SIM = -Wl -mno-cygwin -T simulator/i386pe.x |
|
|
LDFLAGS_SIM = -Wl -mno-cygwin -T simulator/i386pe.x |
|
|
LIBS_SIM = -lglut32 -lglu32 -lopengl32 |
|
|
LIBS_SIM = -lglut32 -lglu32 -lopengl32 -lm |
|
|
else |
|
|
else |
|
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 |
|
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_XOPEN_SOURCE=600 |
|
|
ifeq ($(MACHINE),x86_64) |
|
|
ifeq ($(MACHINE),x86_64) |
|
|
LDFLAGS_SIM = -Wl -T simulator/elf_x86_64.x |
|
|
LDFLAGS_SIM = -Wl -T simulator/elf_x86_64.x |
|
|
else |
|
|
else |
|
|
LDFLAGS_SIM = -Wl -T simulator/elf_i386.x |
|
|
LDFLAGS_SIM = -Wl -T simulator/elf_i386.x |
|
|
endif |
|
|
endif |
|
|
LIBS_SIM = -lglut -lpthread -lGL -lGLU |
|
|
LIBS_SIM = -lglut -lpthread -lGL -lGLU -lm |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
##############################################################################
|
|
|