This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
coding-corner/2017-03-28/Makefile

20 lines
446 B
Makefile
Raw Normal View History

2017-03-29 13:15:45 +02:00
#!/usr/bin/make -f
CFLAGS=-g -O2 -fPIC -fPIE -Wall -Wextra -Wformat=2 -Wunused -Wlogical-op -Wundef \
-Wswitch-enum -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings \
-Wconversion -D_FORTIFY_SOURCE=2 -fstack-protector -Wshadow -Wnested-externs
LDFLAGS=-lm
RFLAGS=-O -g
2017-03-29 13:15:45 +02:00
.PHONY: all
all: jo-so_euler87-c jo-so_euler87-rust
%-rust: %.rs
rustc $(RFLAGS) --crate-type bin -o $@ $^
2017-03-30 20:33:16 +02:00
%-c: %.c
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@