C_TP_Forth/Makefile
2022-12-08 06:11:40 +01:00

36 lines
994 B
Makefile

CC = gcc
CFLAGS = -Wall -pedantic -Werror=format-security -Werror=implicit-function-declaration -D_FORTIFY_SOURCE=2 \
-O2 -pipe -Wl,-z,defs -Wl,-z,now, -Wl,-z,relro
TARGET = main
OBJS = $(TARGET).o logic.o pile.o lexer.o exec.o command.o num.o pileInt.o state.o stackops.o calcop.o \
cmpop.o functions.o show.o
LDFLAGS = -Wall
default: $(TARGET)
all: $(TARGET)
clean:
rm *.o $(TARGET)
test: $(TARGET)
./test.sh
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $@ $(LDFLAGS)
logic.o: logic.h state.h pileInt.h
pile.o: pile.h num.h
lexer.o: lexer.h
exec.o: exec.h state.h command.h pile.h functions.h
command.o: command.h state.h functions.h calcop.h cmpop.h stackops.h show.h logic.h
state.o: state.h definitions.h pile.h lexer.h
num.o: num.h
show.o: show.h state.h
pileInt.o: pileInt.h definitions.h
calcop.o: calcop.h pile.h state.h num.h
stackops.o: stackops.h state.h
cmpop.o: cmpop.h state.h num.h pile.h
functions.o: functions.h definitions.h state.h pileInt.h
.PHONY: default all clean test