Now compiles with mingw; added makefile for windows.

This commit is contained in:
Dale Weiler 2012-04-26 23:23:31 -04:00
parent dd66080aaf
commit db879bd626
2 changed files with 20 additions and 1 deletions

19
Makefile_win Normal file
View file

@ -0,0 +1,19 @@
CC = i486-mingw32-gcc
CFLAGS += -Wall
OBJ = main.o \
lex.o \
error.o \
parse.o \
typedef.o \
util.o \
code.o \
asm.c
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)
gmqcc: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
clean:
rm -f *.o gmqcc

View file

@ -93,7 +93,7 @@
typedef char uint8_size_is_correct [sizeof(uint8_t) == 1?1:-1];
typedef char uint16_size_if_correct [sizeof(uint16_t) == 2?1:-1];
typedef char uint32_size_is_correct [sizeof(uint32_t) == 4?1:-1];
typedef char int8_size_is_correct [sizeof(int8_t) == 1?1:-1];
//typedef char int8_size_is_correct [sizeof(int8_t) == 1?1:-1];
typedef char int16_size_if_correct [sizeof(int16_t) == 2?1:-1];
typedef char int32_size_is_correct [sizeof(int32_t) == 4?1:-1];
/* intptr_t / uintptr_t correct size check */