Raised This Month: $51 Target: $400
 12% 

Problem with compiling on Linux


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 13:27   Problem with compiling on Linux
Reply With Quote #1

I'm using Oracle VM VirtualBox


Ubuntu v.12

my documents -> metamod-1.19
my documents -> hlsdk-2.3-p3
my documents -> metamod-1.19\zbm3\Makefile


compile command - g++ -o Makefile

Error:

Fatal Error: no input files found


Makefile:

PHP Code:
#(C)2004-2005 AMX Mod X Development Team
# Makefile written by David "BAILOPAN" Anderson

HLSDK = ../hlsdk-2.3-p3
MM_ROOT 
= ../metamod-1.19

### EDIT BELOW FOR OTHER PROJECTS ###


OPT_FLAGS = -O3 -funroll-loops --pipe -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG

DEBUG_FLAGS 
= --ggdb3
CPP 
gcc
#CPP = gcc-2.95
NAME ZombieMod

BIN_SUFFIX 
amxx_i386.so

OBJECTS 
h_export.cpp  tasks.cpp  ZBM3_ambience_sounds.cpp  ZBM3_ambience_weather.cpp  ZBM3_class_hero.cpp  ZBM3_class_heroine.cpp \
ZBM3_class_human.cpp  ZBM3_class_zombie.cpp  ZBM3_class_zombie_ghost.cpp  ZBM3_class_zombie_hunter.cpp  ZBM3_Client.cpp  ZBM3_Core.cpp \
ZBM3_cs_maxspeed_api.cpp  ZBM3_cs_player_models_api.cpp  ZBM3_cs_teams_api.cpp  ZBM3_deathmatch.cpp  ZBM3_effects_killer.cpp  ZBM3_EventFunc.cpp \
ZBM3_evolution.cpp  ZBM3_gameplay_fixes.cpp  ZBM3_hud_info.cpp  ZBM3_infection.cpp  ZBM3_InfectionForwards.cpp  ZBM3_knockback.cpp \
ZBM3_main_menu.cpp  ZBM3_maps.cpp  ZBM3_meta_api.cpp  ZBM3_Morale.cpp  ZBM3_nightvision.cpp  ZBM3_objective_remover.cpp \
ZBM3_Precache_Init.cpp  ZBM3_rewards_frags_hp.cpp  ZBM3_team_scoring.cpp  ZBM3_util.cpp  ZBM3_VirtualFunc.cpp  ZBM3_weapon_drop_strip.cpp \
ZBM3_zombie_damage.cpp  ZBM3_zombie_sounds.cpp

LINK 


INCLUDE = -
I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \
    -
I$(MM_ROOT) -I$(HLSDK)/common -I$(HLSDK)/pm_shared -I./tableentries -Isdk

GCC_VERSION 
:= $(shell $(CPP) -dumpversion >&cut -b1)

ifeq "$(DEBUG)" "true"
    
BIN_DIR Debug
    CFLAGS 
= $(DEBUG_FLAGS)
else
    
BIN_DIR Release

    ifeq 
"$(GCC_VERSION)" "4"
        
OPT_FLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
    
endif
    
CFLAGS = $(OPT_FLAGS)
endif

CFLAGS += -Wall -Wno-non-virtual-dtor -fno-exceptions -DHAVE_STDINT_H -fno-rtti -m32  -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -fno-threadsafe-statics

BINARY 
= $(NAME)_$(BIN_SUFFIX)
CFLAGS += -DPAWN_CELL_SIZE=32 -DJIT -DASM32
OPT_FLAGS 
+= -march=i586

OBJ_LINUX 
:= $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)

$(
BIN_DIR)/%.o: %.cpp
    
$(CPP) $(INCLUDE) $(CFLAGS) -$@ -$<

all:
    
mkdir -$(BIN_DIR)
    
mkdir -$(BIN_DIR)/sdk
    
$(MAKEweaponmod

Zombie
-Mod: $(OBJ_LINUX)
    $(
CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)

debug:    
    $(
MAKEall DEBUG=true

default: all

clean
:
    
rm -rf Release/*.o
    rm -rf Release/sdk/*.o
    rm -rf Release/$(NAME)_$(BIN_SUFFIX)
    rm -rf Debug/*.o
    rm -rf Debug/sdk/*.o
    rm -rf Debug/$(NAME)_$(BIN_SUFFIX) 
__________________

Last edited by Bos93; 02-03-2013 at 14:16.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-03-2013 , 15:26   Re: Problem with compiling on Linux
Reply With Quote #2

g++ -o Makefile ... -_-' This file a configuration file, not a file to compile.

->

make
__________________
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 15:56   Re: Problem with compiling on Linux
Reply With Quote #3

Thanks

andrei@Andrei:~S cd metamod-1.19
andrei@Andrei:~metamod-1.19$ cd zbm3
andrei@Andrei:~metamod-1.19/zbm3 make
make: *** no purpose. stopped.
andrei@Andrei:~metamod-1.19/zbm3$

How do I find the right directories?

I think a problem here:
HLSDK = ../hlsdk-2.3-p3
MM_ROOT = ../metamod-1.19/metamod
__________________

Last edited by Bos93; 02-03-2013 at 15:57.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 02-03-2013 , 17:20   Re: Problem with compiling on Linux
Reply With Quote #4

Change:
Code:
all:
    mkdir -p $(BIN_DIR)
    mkdir -p $(BIN_DIR)/sdk
    $(MAKE) weaponmod

Zombie-Mod: $(OBJ_LINUX)
    $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
to
Code:
all:
    mkdir -p $(BIN_DIR)
    mkdir -p $(BIN_DIR)/sdk
    $(MAKE) ZombieMod

ZombieMod: $(OBJ_LINUX)
    $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 17:39   Re: Problem with compiling on Linux
Reply With Quote #5

Yes, I noticed, but the error did not change.
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 02-03-2013 , 17:48   Re: Problem with compiling on Linux
Reply With Quote #6

Hm, i'm not an expert in this, but try this:
Code:
HLSDK = ../../hlsdk-2.3-p3
MM_ROOT = ../../metamod-1.19
If that doesn't work, wait for someone more experienced
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 17:55   Re: Problem with compiling on Linux
Reply With Quote #7

doesn't work
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 02-03-2013 , 18:30   Re: Problem with compiling on Linux
Reply With Quote #8

Here you go, tested on ubuntu:
Code:
#(C)2004-2005 AMX Mod X Development Team
# Makefile written by David "BAILOPAN" Anderson

HLSDK = ../../hlsdk-2.3-p3
MM_ROOT = ../metamod-1.19

### EDIT BELOW FOR OTHER PROJECTS ###


OPT_FLAGS = -O3 -funroll-loops -s -pipe -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG

DEBUG_FLAGS = -g -ggdb3
CPP = g++
NAME = ZombieMod

BIN_SUFFIX = amxx_i386.so

OBJECTS = h_export.cpp engine_api.cpp meta_api.cpp 

LINK = 

INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \
    -I$(MM_ROOT) -I$(HLSDK)/common -I$(HLSDK)/pm_shared -I./tableentries -Isdk

GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)

ifeq "$(DEBUG)" "true"
    BIN_DIR = Debug
    CFLAGS = $(DEBUG_FLAGS)
else
    BIN_DIR = Release

    ifeq "$(GCC_VERSION)" "4"
        OPT_FLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
    endif
    CFLAGS = $(OPT_FLAGS)
endif

CFLAGS += -Wall -Wno-non-virtual-dtor -fno-exceptions -DHAVE_STDINT_H -fno-rtti -m32  -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -fno-threadsafe-statics

BINARY = $(NAME)_$(BIN_SUFFIX)
CFLAGS += -DPAWN_CELL_SIZE=32 -DJIT -DASM32
OPT_FLAGS += -march=i586

OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)

$(BIN_DIR)/%.o: %.cpp
    $(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<

all:
    mkdir -p $(BIN_DIR)
    mkdir -p $(BIN_DIR)/sdk
    $(MAKE) ZombieMod

ZombieMod: $(OBJ_LINUX)
    $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)

debug:    
    $(MAKE) all DEBUG=true

default: all

clean:
    rm -rf Release/*.o
    rm -rf Release/sdk/*.o
    rm -rf Release/$(NAME)_$(BIN_SUFFIX)
    rm -rf Debug/*.o
    rm -rf Debug/sdk/*.o
    rm -rf Debug/$(NAME)_$(BIN_SUFFIX)
My config:
documents / hlsdk
documents / metamod / zmb3 /
Makefile in zbm3 folder.
Output is in: documents / metamod / zmb3 / Release /
File: ZombieMod_amxx_i386.so

EDIT: just put your "OBJECTS" files

Last edited by OvidiuS; 02-03-2013 at 18:33.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 18:46   Re: Problem with compiling on Linux
Reply With Quote #9

Thanks

make: *** no purpose. stopped.
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-03-2013 , 18:54   Re: Problem with compiling on Linux
Reply With Quote #10

...
Attached Thumbnails
Click image for larger version

Name:	Безымянный.jpg
Views:	139
Size:	87.7 KB
ID:	115517  
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode