This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
piquant/tests/Makefile

21 lines
448 B
Makefile
Raw Normal View History

CFLAGS:=-g3 -ffreestanding -fno-builtin -I../src -ansi -Wall -Werror
2016-03-27 13:20:36 -07:00
2016-03-27 12:19:45 -07:00
%.o: %.c
2016-03-27 13:20:36 -07:00
gcc $(CFLAGS) -c -o $@ $<
2016-03-27 12:19:45 -07:00
for file in $$(cat $$(echo $@ | sed 's/\.o$$//').deps); do \
2016-03-27 13:20:36 -07:00
gcc $(CFLAGS) -c -o ./$${file}.o ../src/$$file.c ; \
2016-03-27 12:19:45 -07:00
done
%.elf: %.o
2016-03-27 13:20:36 -07:00
gcc $(CFLAGS) -o $@ $^ $$(cat $$(echo $@ | sed 's/\.elf$$//').deps | sed 's/$$/\.o/g')
2016-03-27 12:19:45 -07:00
all_targets:=$(shell ls *c | sed 's/\.c$$/\.elf/g')
all: $(all_targets)
.PHONY: clean
clean:
rm -f *o
rm -f *elf