Now requires GCC-3 to compile, fixes retarded linking problem

This commit is contained in:
David Anderson
2005-08-18 07:01:47 +00:00
parent a6ca045086
commit 58fec512e5
6 changed files with 18 additions and 24 deletions

View File

@ -3,14 +3,14 @@
### EDIT BELOW FOR OTHER PROJECTS ###
OPT_FLAGS = -O3 -fno-rtti -funroll-loops -s -pipe
OPT_FLAGS = -O3 -funroll-loops -s -pipe
DEBUG_FLAGS = -g -ggdb3
CPP = g++
CPP = gcc
BINARY = amxxpc
OBJECTS = amx.cpp amxxpc.cpp Binary.cpp
LINK = -lz
LINK = -lz /lib/libstdc++.a
INCLUDE = -I. -L.
@ -22,7 +22,7 @@ else
CFLAGS = $(OPT_FLAGS)
endif
CFLAGS += -DLINUX -DNDEBUG -Wno-deprecated -fexceptions -DHAVE_STDINT_H -DAMX_ANSIONLY
CFLAGS += -DLINUX -DNDEBUG -Wno-deprecated -fexceptions -DHAVE_STDINT_H -DAMX_ANSIONLY -fno-rtti -static-libgcc
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)

View File

@ -99,7 +99,6 @@ int main(int argc, char **argv)
fclose(fp);
}
dlclose(lib);
unlink(file);
HINSTANCE lib64 = 0;
@ -108,8 +107,7 @@ int main(int argc, char **argv)
#else
lib64 = dlmount("amxxpc64.dll");
#endif
pc_printf = (PRINTF)dlsym(lib64, "pc_printf");
if (!lib64 || !pc_printf)
if (!lib64)
{
pc_printf("64bit compiler failed to instantiate.\n");
exit(0);
@ -129,6 +127,8 @@ int main(int argc, char **argv)
sc64(argc, argv);
dlclose(lib64);
if (file == NULL)
{
pc_printf("Could not locate the output file on second pass.\n");
@ -207,7 +207,7 @@ int main(int argc, char **argv)
pc_printf("Done.\n");
dlclose(lib64);
dlclose(lib);
exit(0);
}