RISC-V/V203/usb/usart/test/Makefile

25 lines
360 B
Makefile
Raw Normal View History

2024-10-15 19:26:19 +02:00
PR = test.elf
CC = gcc
CXX= g++ -std=c++17
AS = as
CFLAGS = -Wall -Os
MFLAGS = -o $(PR)
LFLAGS = -lpthread
all : $(PR)
OBJECTS = main.o usart.o baud.o
$(PR) : $(OBJECTS)
$(CXX) $(MFLAGS) $(OBJECTS) $(LFLAGS)
clean:
rm -f *.o *~
%.o : %.c
$(CC) -c $(CFLAGS) -o $@ $<
%.o : %.cpp
$(CXX) -c $(CFLAGS) -o $@ $<
%.o : %.s
$(AS) -o $@ $<
.PHONY : all clean