Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SOURCES = test.c derp.c
- OBJECTS = $(SOURCES:.c=.o)
- TARGET = test.tns
- CC = nspire-gcc
- LD = nspire-ld
- OBJCOPY = arm-none-eabi-objcopy
- CFLAGS = -Wall -Wextra -nostdlib -O3
- LDFLAGS =
- ifneq ($(findstring cx,$(MAKECMDGOALS)),)
- CFLAGS += -D NSP_COLOR_LCD
- LIBS = -lSDL-CX
- else
- LIBS = -lSDL
- endif
- cx: all
- tc: all
- 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) *.elf
Advertisement
Add Comment
Please, Sign In to add comment