mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Wrote a basic lexer
This commit is contained in:
27
source/makefile
Normal file
27
source/makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
CC=gcc
|
||||
|
||||
IDIR =.
|
||||
CFLAGS=$(addprefix -I,$(IDIR)) -g -Wall -W -pedantic
|
||||
LIBS=
|
||||
|
||||
ODIR=obj
|
||||
SRC = $(wildcard *.c)
|
||||
OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o))
|
||||
|
||||
OUT = ../$(OUTDIR)/toy
|
||||
|
||||
all: $(OBJ)
|
||||
$(CC) -o $(OUT) $^ $(CFLAGS) $(LIBS)
|
||||
|
||||
$(OBJ): | $(ODIR)
|
||||
|
||||
$(ODIR):
|
||||
mkdir $(ODIR)
|
||||
|
||||
$(ODIR)/%.o: %.c
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
$(RM) $(ODIR)
|
||||
Reference in New Issue
Block a user