summaryrefslogtreecommitdiffstats
path: root/inf/priprave/dn/Makefile
blob: 1dd50ea1594d1510572360715169aa003815e818 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CFLAGS += -Wextra -Wall -pedantic -g -O0 -finput-charset=UTF-8 -fanalyzer -fextended-identifiers
LDFLAGS += -lm
CC ?= cc
SHELL ?= /bin/sh
cbins := $(subst .c,,$(wildcard *.c))
asmbins := $(subst .asm,,$(wildcard *.asm))
default: $(cbins) $(asmbins)
%: %.c
	$(CC) $(CFLAGS) $< -o$@ $(LDFLAGS)
%: %.asm
	# za zdaj sicer še ni ničesar v zbornem jeziku, mogoče pa bo ...
	nasm -f elf $< && ld -m elf_i386 -s -o $@ $@.o
.PHONY: clean
clean:
	rm -f $(bins) $(asmbins) *.o