added makefiles to compile with mingw

This commit is contained in:
Joachim Bauch
2010-10-24 00:37:53 +02:00
parent 1f8eb009e5
commit a486d330f2
8 changed files with 35 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
*.o
+2
View File
@@ -0,0 +1,2 @@
*.o
*.exe
+1 -1
View File
@@ -8,7 +8,7 @@
typedef int (*addNumberProc)(int, int);
#define DLL_FILE "..\\..\\SampleDLL\\Debug\\SampleDLL.dll"
#define DLL_FILE "..\\SampleDLL\\SampleDLL.dll"
void LoadFromFile(void)
{
+16
View File
@@ -0,0 +1,16 @@
CC = gcc
CPP = g++
LINK = ld
CFLAGS = -Wall -g
LDFLAGS =
OBJ = DllLoader.o ../../MemoryModule.o
DllLoader.exe: $(OBJ)
$(CC) $(LDFLAGS) -o DllLoader.exe $(OBJ)
%.o: %.cpp
$(CPP) $(CFLAGS) -c $<
%.o: %.cc
$(CC) $(CFLAGS) -c $<
+2
View File
@@ -0,0 +1,2 @@
*.o
*.dll
+11
View File
@@ -0,0 +1,11 @@
CC = g++
CFLAGS = -Wall -g -DSAMPLEDLL_EXPORTS
LDFLAGS = -shared
OBJ = SampleDLL.o
SampleDLL.dll: $(OBJ)
$(CC) $(LDFLAGS) -o SampleDLL.dll $(OBJ)
%.o: %.cpp
$(CC) $(CFLAGS) -c $<
+1 -1
View File
@@ -7,4 +7,4 @@ SAMPLEDLL_API int addNumbers(int a, int b)
return a + b;
}
}
}
+1 -1
View File
@@ -8,4 +8,4 @@ extern "C" {
SAMPLEDLL_API int addNumbers(int a, int b);
}
}