Just copy the files in the archive to your .ndless folder, and using the sample Makefile included with nSDL add
-lfdm to the
LIBS line (i.e.
LIBS = -lSDL -lfdm). With a simple
make it should then compile fine.
Oh and there's no need to use
-I or
-L if the .ndless folder is in your home (whatever it is on your OS).
EDIT: Didn't notice there was no nSDL involved. Download fdlibm
here, do what I said up there, and use this as your Makefile which should make it work (just adapt it for you of course):
SOURCES = test.c
TARGET = Test.tns
OBJECTS = $(SOURCES:.c=.o)
CC = nspire-gcc
LD = nspire-ld
OBJCOPY = arm-none-eabi-objcopy
CFLAGS = -Wall -Wextra -Ofast
LDFLAGS =
LIBS = -lfdm
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(LD) $(LDFLAGS) $^ $(LIBS) -o $(@:.tns=.elf)
$(OBJCOPY) -O binary $(@:.tns=.elf) $(TARGET)
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET:.tns=.elf) $(TARGET)