Merging baseq3 and missionpack builds into one

Locked
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Merging baseq3 and missionpack builds into one

Post by themuffinman »

For the sake of de-cluttering and simplifying the code of an ioquake3 mod I'm working on, I've been merging the baseq3 and missionpack builds with the aim of building only missionpack builds, not baseq3.

This is more or less how I've done it:
1. Removed all defs and code within #ifndef MISSIONPACK ... #endif
2. Removed #ifdef MISSIONPACK's and the corresponding #endif's, removed everything in the #else ... #endif's
3. Added cg_newdraw.o and ui_shared.o for the cgame baseq3 build in the makefile
4. Tried to build the fucker (I'm using MinGW)

The error I get is after cg_weapons.o in cgame baseq3 when the compiler reaches ui_shared.o (so cg_newdraw.o is not the issue):
make[2]: *** No rule to make target 'build/release-mingw32-x86/baseq3/ui/ui_shared.o', needed by 'build/release-mingw32-x86/baseq3/cgamex86.dll'. Stop.

Fair enough, I double-check the makefile and ui_shared.c. I don't see anything wrong there. Edit the makefile to replace the Q3 vm objects etc. with missionpack objects, renamed accordingly. Try again, same error.

I'm out of ideas... what am I doing wrong? I attached the makefile in case the problem is with that. Any help is appreciated...
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Merging baseq3 and missionpack builds into one

Post by ^misantropia^ »

What does `find build/ -name ui_shared.d` print and what does the file (if it exists) look like? I suspect that it contains a make rule that is only triggered for missionpack builds.
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: Merging baseq3 and missionpack builds into one

Post by themuffinman »

Hmm make rules... yep got it working now thanks! Looking through the game module rules I found the problem was that the Q3UIDIR was still using the old q3_ui/ folder instead of ui/ and the missionpack UIDIR references needing changing to Q3UIDIR's. Working perfectly now and the code is far less irritating to sieve through. Attached the fixed makefile if anyone is interested...
Locked