rust_with_c_example/Makefile
2024-01-09 13:06:53 -06:00

15 lines
258 B
Makefile

CFLAGS= -Wall -Wextra -Wfatal-errors -g3
LDFLAGS= -s
OBJS= example
RSFLAGS=
all: $(OBJS)
example: main.o librs.a
$(CC) $(LDFLAGS) $^ -o $@
lib%.a: %.rs
rustc --crate-type=staticlib $^
%.o: %.c
$(CC) $(CFLAGS) -c $^
clean:
$(RM) $(OBJS) *.o librs.a