Skip to content

Commit

Permalink
Generate executable in current directory
Browse files Browse the repository at this point in the history
  • Loading branch information
prithvitewatia committed Jun 29, 2021
1 parent 042f554 commit 58d96c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ CC = gcc
CFLAGS = -g -Wall
SRC = src
REQ = $(SRC)/lexer.l $(SRC)/parser.y $(SRC)/calculator.c $(SRC)/colour.c
BIN = bin

ifeq ($(OS),WINDOWS_NT)
CFLAGS += -D WIN32
endif
calculator : $(REQ)
bison -d $(SRC)/parser.y
flex -o calculator.lex.c $(SRC)/lexer.l
$(CC) $(CFLAGS) parser.tab.c calculator.lex.c $(SRC)/calculator.c $(SRC)/colour.c -o $(BIN)/$@
$(CC) $(CFLAGS) parser.tab.c calculator.lex.c $(SRC)/calculator.c $(SRC)/colour.c -o $@

0 comments on commit 58d96c0

Please sign in to comment.