From 179f5d3a694d805ad37962e5c0dd2718cbfcbe48 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 1 Aug 2014 00:20:36 +0200 Subject: [PATCH] compile as C --- GfxRip.cpp => GfxRip.c | 4 +++- Makefile | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) rename GfxRip.cpp => GfxRip.c (94%) diff --git a/GfxRip.cpp b/GfxRip.c similarity index 94% rename from GfxRip.cpp rename to GfxRip.c index 580329d..1423c06 100644 --- a/GfxRip.cpp +++ b/GfxRip.c @@ -5,6 +5,7 @@ #include "tdgui.h" #include #include +#include volatile int target_game_time = 0; @@ -117,8 +118,9 @@ int getpixelcol(int pos, int x, int y) int bit1; int nn; int bitn; + int i; - for (int i=0; i < 8; i++) + for (i=0; i < 8; i++) { bit[i]=false; } diff --git a/Makefile b/Makefile index 2d848ad..fb3ab4a 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -SRCS=GfxRip.cpp +SRCS=GfxRip.c OBJS=GfxRip.o PROG=GfxRip LIBS=bgui2/lib/libbgui.a -CXXFLAGS=-fpermissive +CFLAGS=-std=c99 -include config.mak @@ -14,10 +14,10 @@ clean: rm -f $(OBJS) $(PROG): $(OBJS) $(LIBS) - $(CXX) -o $@ $^ -lalleg $(LDFLAGS) + $(CC) -o $@ $^ -lalleg $(LDFLAGS) %.o: %.cpp - $(CXX) $(INC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + $(CC) $(INC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< $(LIBS): make -C bgui2/src -f Makefile.unx -- 2.11.4.GIT