-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathMakefile.w32
36 lines (27 loc) · 942 Bytes
/
Makefile.w32
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
EXT=.exe
all: c99conv$(EXT) c99wrap$(EXT)
CLANGDIR=/home/rbultje/Projects/llvm-3.1.src
CC=cl.exe
CFLAGS=-nologo -Z7 -D_CRT_SECURE_NO_WARNINGS=1 -Dpopen=_popen -Dunlink=_unlink -Dstrdup=_strdup -Dsnprintf=_snprintf -I. -I$(CLANGDIR)/tools/clang/include
LDFLAGS=-nologo -Z7 $(CLANGDIR)/lib/Release/libclang.lib
clean:
rm -f c99conv$(EXT) c99wrap$(EXT) convert.o compilewrap.o
rm -f unit.c.c unit2.c.c
test1: c99conv$(EXT)
$(CC) -P unit.c -Fiunit.prev.c
./c99conv unit.prev.c unit.post.c
diff -u unit.{prev,post}.c
test2: c99conv$(EXT)
$(CC) -P unit2.c -Fiunit2.prev.c
./c99conv unit2.prev.c unit2.post.c
diff -u unit2.{prev,post}.c
test3: c99conv$(EXT)
$(CC) $(CFLAGS) -P -Ficonvert.prev.c convert.c
./c99conv convert.prev.c convert.post.c
diff -u convert.{prev,post}.c
c99conv$(EXT): convert.o
$(CC) -Fe$@ $< $(LDFLAGS) $(LIBS)
c99wrap$(EXT): compilewrap.o
$(CC) -Fe$@ $< $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -Fo$@ -c $<