TaskSwitch/Makefile
2026-02-23 20:28:38 -06:00

24 lines
444 B
Makefile

# Makefile for the cooperative task switching library (DJGPP)
#
# Native DJGPP: make
# Cross-compile: make CC=i586-pc-msdosdjgpp-gcc
CC = gcc
CFLAGS = -Wall -Wextra -std=gnu99 -O2
LDFLAGS =
.PHONY: all clean debug
all: demo.exe
debug: CFLAGS = -Wall -Wextra -std=gnu99 -g -O0
debug: demo.exe
demo.exe: demo.o taskswitch.o
$(CC) $(LDFLAGS) -o $@ $^
%.o: %.c taskswitch.h
$(CC) $(CFLAGS) -c -o $@ $<
clean:
-rm -f *.o demo.exe