-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·45 lines (35 loc) · 1.18 KB
/
Makefile
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
42
43
44
45
#
# NOTE: For now, to build for Android, use
#
# make OSTYPE=android MACHTYPE=x86_64 COMPILERVARIANT= WFLAGS=
#
include config.local
COMPILERVARIANT = gcc #clang
include $(CONFIGPATH)/config.$(OSTYPE)-$(MACHTYPE).$(COMPILERVARIANT)
TARGET = libflex-$(OSTYPE).a
#CC = llvm-gcc #clang #llvm-gcc
#LD = llvm-gcc #clang #llvm-gcc
#AR = ar #llvm-ar #ar
LINT = /usr/local/bin/splint
INCDIRS = -I.
OPTFLAGS =
DBGFLAGS =
WFLAGS = -Wall #-Werror
CFLAGS = $(PLATFORM_DBGFLAGS) $(PLATFORM_CFLAGS) $(PLATFORM_DFLAGS) $(PLATFORM_OPTFLAGS) -DFLEX64 $(INCDIRS)#-emit-llvm -DFLEX64 $(INCDIRS) #-DFLEX64 $(INCDIRS)
LIBOBJS =\
flex-$(OSTYPE).$(OBJECTEXTENSION)\
flextoken.$(OBJECTEXTENSION)\
flexmalloc.$(OBJECTEXTENSION)\
HEADERS =\
flexerror.h\
flex.h\
all: libflex-$(TARGET).a
libflex-$(TARGET).a: Makefile $(LIBOBJS)
$(AR) rv $(TARGET) $(LIBOBJS)
%.$(OBJECTEXTENSION): %.c $(HEADERS) Makefile
# $(LINT) $(INCDIRS) $<
$(CC) $(CFLAGS) $(WFLAGS) $(DBGFLAGS) $(OPTFLAGS) -c $<
flexversion.h: $(HEADERS) Makefile
echo 'char FLEX_VERSION[] = "0.0-alpha (build '`date '+%m-%d-%Y-%H:%M:%S'`-`whoami`@`hostname`-`uname`\)\"\; > flexversion.h
clean:
rm -f $(TARGET) $(LIBOBJS)