2023-08-27 19:48:06 +03:00
|
|
|
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
|
|
|
|
|
|
|
|
SOURCES := $(call rwildcard,src/,*.c)
|
|
|
|
HEADERS := $(call rwildcard,src/,*.h)
|
|
|
|
|
|
|
|
PREFIX = /usr/local
|
|
|
|
|
|
|
|
.PHONY: install clean
|
|
|
|
|
|
|
|
ntc: $(SOURCES) $(HEADERS)
|
|
|
|
ifdef OW
|
2024-02-13 21:30:42 +02:00
|
|
|
wcl386 -ml $(if $(GAS),-DSYNTAX_GAS=1,) $(if $(DEBUG),-DDEBUG=1,) -fe="ntc.exe" -bt=dos -l=dos4g -ml $(if $(DEBUG),,-d0 -os -om -ob -oi -ol -ox) -lr -za99 -i=src $(SOURCES)
|
2023-08-27 19:48:06 +03:00
|
|
|
else
|
|
|
|
cc $(if $(GAS),-DSYNTAX_GAS=1,) $(if $(DEBUG),-DDEBUG=1,) -Wall -o ntc -fno-PIE -no-pie -std=gnu11 $(if $(DEBUG),-O0 -g,-Os -s) -fms-extensions -Isrc $(SOURCES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
install: ntc
|
|
|
|
mv ./ntc $(PREFIX)/bin
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm ./ntc
|