Thread: vbcc 0.9d
View Single Post
Old 04 April 2015, 22:27   #41

Join Date: Jul 2008
Location: Sweden
Posts: 2,025
Originally Posted by dalton View Post
I was able to compile vasm and vlink on win32 using the incuded makefiles, but it seems there is only one vbcc makefile and it's hardwired to gcc. Does anyone have win32 binaries, or pointers on how to compile for windows? I'm using visual c++ 2010.

I use this one. Call it with
nmake /f makefile.win32
and for the 64-bit types you specify
signed __int64
unsigned __int64

EDIT: I've attached binaries for 32-bit and 64-bit Windows

# debug build
#CC = cl /RTCs /MTd /Zi /nologo /Dsnprintf=_snprintf

# release build
CC = cl /O2 /MT /nologo /Dsnprintf=_snprintf

NCC = cl

all: bin/vc.exe bin/vbcc$(TARGET).exe

bin/vc.exe: frontend/vc.c
	$(CC) frontend/vc.c /Febin/vc.exe $(LDFLAGS)

TRGDIR = machines/$(TARGET)

bobjects = $(TRGDIR)/main.obj $(TRGDIR)/vars.obj $(TRGDIR)/declaration.obj \
	   $(TRGDIR)/parse_expr.obj $(TRGDIR)/type_expr.obj $(TRGDIR)/ic.obj \
	   $(TRGDIR)/machine.obj $(TRGDIR)/statements.obj \
	   $(TRGDIR)/supp.obj $(TRGDIR)/dt.obj \
           $(TRGDIR)/assert.obj $(TRGDIR)/cpp.obj $(TRGDIR)/hash.obj \
           $(TRGDIR)/lexer.obj $(TRGDIR)/macro.obj $(TRGDIR)/mem.obj \

fobjects = $(TRGDIR)/opt.obj $(TRGDIR)/av.obj $(TRGDIR)/rd.obj $(TRGDIR)/regs.obj \
	   $(TRGDIR)/flow.obj $(TRGDIR)/cse.obj $(TRGDIR)/cp.obj $(TRGDIR)/loop.obj \
	   $(TRGDIR)/alias.obj $(bobjects)

bin/vbcc$(TARGET).exe: $(fobjects)
	$(CC) $(fobjects) /Febin/vbcc$(TARGET).exe $(LDFLAGS)

bin/dtgen.exe: datatypes/dtgen.c datatypes/datatypes.h datatypes/dtconv.h
	$(NCC) datatypes/dtgen.c /Febin/dtgen.exe /Idatatypes

$(TRGDIR)/dt.h: bin/dtgen.exe $(TRGDIR)/machine.dt
	bin\dtgen.exe $(TRGDIR)/machine.dt $(TRGDIR)/dt.h $(TRGDIR)/dt.c

$(TRGDIR)/dt.c: bin/dtgen.exe $(TRGDIR)/machine.dt
	bin\dtgen.exe $(TRGDIR)/machine.dt $(TRGDIR)/dt.h $(TRGDIR)/dt.c

$(TRGDIR)/dt.obj: $(TRGDIR)/dt.h $(TRGDIR)/dt.c
	$(CC) /c $(TRGDIR)/dt.c /Fo$(TRGDIR)/dt.obj /I$(TRGDIR) /Idatatypes

$(TRGDIR)/supp.obj: supp.c supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c supp.c /Fo$(TRGDIR)/supp.obj /I$(TRGDIR)

$(TRGDIR)/main.obj: main.c vbc.h supp.h vbcc_cpp.h ucpp/cpp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c main.c /Fo$(TRGDIR)/main.obj /I$(TRGDIR)

$(TRGDIR)/vars.obj: vars.c vbc.h supp.h $(TRGDIR)/machine.h errors.h $(TRGDIR)/dt.h
	$(CC) /c vars.c /Fo$(TRGDIR)/vars.obj /I$(TRGDIR)

$(TRGDIR)/declaration.obj: declaration.c vbc.h supp.h vbcc_cpp.h ucpp/cpp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c declaration.c /Fo$(TRGDIR)/declaration.obj /I$(TRGDIR)

$(TRGDIR)/parse_expr.obj: parse_expr.c vbc.h supp.h vbcc_cpp.h ucpp/cpp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c parse_expr.c /Fo$(TRGDIR)/parse_expr.obj /I$(TRGDIR)

$(TRGDIR)/type_expr.obj: type_expr.c vbc.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c type_expr.c /Fo$(TRGDIR)/type_expr.obj /I$(TRGDIR)

$(TRGDIR)/ic.obj: ic.c vbc.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c ic.c /Fo$(TRGDIR)/ic.obj /I$(TRGDIR)

$(TRGDIR)/statements.obj: statements.c vbc.h supp.h vbcc_cpp.h ucpp/cpp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c statements.c /Fo$(TRGDIR)/statements.obj /I$(TRGDIR)

$(TRGDIR)/opt.obj: opt.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c opt.c /Fo$(TRGDIR)/opt.obj /I$(TRGDIR)

$(TRGDIR)/av.obj: av.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c av.c /Fo$(TRGDIR)/av.obj /I$(TRGDIR)

$(TRGDIR)/rd.obj: rd.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c rd.c /Fo$(TRGDIR)/rd.obj /I$(TRGDIR)

$(TRGDIR)/regs.obj: regs.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c regs.c /Fo$(TRGDIR)/regs.obj /I$(TRGDIR)

$(TRGDIR)/flow.obj: flow.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c flow.c /Fo$(TRGDIR)/flow.obj /I$(TRGDIR)

$(TRGDIR)/cse.obj: cse.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c cse.c /Fo$(TRGDIR)/cse.obj /I$(TRGDIR)

$(TRGDIR)/cp.obj: cp.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c cp.c /Fo$(TRGDIR)/cp.obj /I$(TRGDIR)

$(TRGDIR)/loop.obj: loop.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c loop.c /Fo$(TRGDIR)/loop.obj /I$(TRGDIR)

$(TRGDIR)/alias.obj: alias.c opt.h supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h
	$(CC) /c alias.c /Fo$(TRGDIR)/alias.obj /I$(TRGDIR)

$(TRGDIR)/preproc.obj: preproc.c vbpp.h supp.h vbc.h $(TRGDIR)/dt.h
	$(CC) /c preproc.c /Fo$(TRGDIR)/preproc.obj /I$(TRGDIR)

$(TRGDIR)/assert.obj: ucpp/assert.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/assert.c /Fo$(TRGDIR)/assert.obj /I$(TRGDIR)

$(TRGDIR)/cpp.obj: ucpp/cpp.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/cpp.c /Fo$(TRGDIR)/cpp.obj /I$(TRGDIR)

$(TRGDIR)/hash.obj: ucpp/hash.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/hash.c /Fo$(TRGDIR)/hash.obj /I$(TRGDIR)

$(TRGDIR)/lexer.obj: ucpp/lexer.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/lexer.c /Fo$(TRGDIR)/lexer.obj /I$(TRGDIR)

$(TRGDIR)/macro.obj: ucpp/macro.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/macro.c /Fo$(TRGDIR)/macro.obj /I$(TRGDIR)

$(TRGDIR)/mem.obj: ucpp/mem.c ucpp/cpp.h ucpp/mem.h ucpp/hash.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/mem.c /Fo$(TRGDIR)/mem.obj /I$(TRGDIR)

$(TRGDIR)/eval.obj: ucpp/eval.c ucpp/cpp.h ucpp/mem.h ucpp/tune.h $(TRGDIR)/dt.h
	$(CC) -DNO_UCPP_ERROR_FUNCTIONS /c ucpp/eval.c /Fo$(TRGDIR)/eval.obj /I$(TRGDIR)

$(TRGDIR)/machine.obj: $(TRGDIR)/machine.c supp.h $(TRGDIR)/machine.h $(TRGDIR)/dt.h dwarf2.c
	$(CC) /c $(TRGDIR)/machine.c /Fo$(TRGDIR)/machine.obj /I$(TRGDIR) /I.

Last edited by Leffmann; 02 September 2017 at 12:13.
Leffmann is offline  
AdSense AdSense  
Page generated in 0.13486 seconds with 9 queries