public
Description: a personal programming language written for school
Clone URL: git://github.com/brosner/dpl.git
dpl / makefile
100755 41 lines (29 sloc) 0.87 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
# define building tools
CC    = gcc
LEXER  = flex
YACC  = bison
 
# define paths
ROOT  = /Users/brian/Development/dpl
BIN    = $(ROOT)/bin
SRC    = $(ROOT)/src
EXT    = $(SRC)/ext
 
# define program specifics
PROG    = $(BIN)/dpl
 
LEXFILE    = $(SRC)/dpl_scanner.l
YACCFILE  = $(SRC)/dpl_parser.y
LEXOUT    = $(SRC)/dpl_scanner.c
YACCOUT    = $(SRC)/dpl_parser.c
 
SRCS    = $(LEXOUT) $(YACCOUT) main.c variables.c
 
OBJS    = hash.o stack.o dpl_api.o dpl_scanner.o dpl_parser.o main.o variables.o arrays.o functions.o operators.o control_structs.o file.o
EXT_OBJS  = string.o math.o array.o
 
all: dpl clean
 
dpl:
  $(LEXER) -o$(LEXOUT) $(LEXFILE)
  $(YACC) -y -d -o $(YACCOUT) $(YACCFILE)
  
  # compile core source
  $(CC) -ggdb -c $(SRC)/*.c
 
  # compile ext source
  $(CC) -c -I$(SRC) $(EXT)/*.c
 
  $(CC) -ggdb -o $(PROG) $(OBJS) $(EXT_OBJS)
 
clean:
  rm -f ./*.o