Add bspinfo to the build

This commit is contained in:
Yamagi Burmeister 2012-02-02 11:54:03 +00:00
parent 5f351fb07b
commit 2fdd3a7e7f
3 changed files with 26 additions and 54 deletions

View file

@ -70,7 +70,7 @@ endif
# ----------
# Builds everything
all: qdata
all: bspinfo qdata
# ----------
@ -94,6 +94,19 @@ build/qdata/%.o: %.c
# ----------
# bspinfo
bspinfo:
@echo '===> Building bspinfo'
${Q}mkdir -p release
$(MAKE) release/bspinfo
build/bspinfo/%.o: %.c
@echo '===> CC $<'
${Q}mkdir -p $(@D)
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
# ----------
# common stuff
build/common/%.o: %.c
@echo '===> CC $<'
@ -115,6 +128,10 @@ COMMON_OBJS_ = \
src/common/threads.o \
src/common/trilib.o
# Used by bspinfo
BSPINFO_OBJS_ = \
src/bspinfo/bspinfo.o
# Used by qdata
QDATA_OBJS_ = \
src/qdata/images.o \
@ -128,17 +145,20 @@ QDATA_OBJS_ = \
# Rewrite pathes to our object directory
COMMON_OBJS = $(patsubst %,build/common/%,$(COMMON_OBJS_))
BSPINFO_OBJS = $(patsubst %,build/common/%,$(BSPINFO_OBJS_))
QDATA_OBJS = $(patsubst %,build/qdata/%,$(QDATA_OBJS_))
# ----------
# Generate header dependencies
COMMON_DEPS= $(COMMON_OBJS:.o=.d)
BSPINFO_DEPS= $(BSPINFO_OBJS:.o=.d)
QDATA_DEPS= $(QDATA_OBJS:.o=.d)
# ----------
-include $(COMMON_DEPS)
-include $(BSPINFO_DEPS)
-include $(QDATA_DEPS)
# ----------
@ -148,3 +168,8 @@ release/qdata : $(COMMON_OBJS) $(QDATA_OBJS)
@echo '===> LD $@'
${Q}$(CC) $(COMMON_OBJS) $(QDATA_OBJS) $(LDFLAGS) -o $@
# release/bspinfo
release/bspinfo : $(COMMON_OBJS) $(BSPINFO_OBJS)
@echo '===> LD $@'
${Q}$(CC) $(COMMON_OBJS) $(BSPINFO_OBJS) $(LDFLAGS) -o $@

View file

@ -1,53 +0,0 @@
CFLAGS = -c
LDFLAGS =
ODIR = baddir
EXEBASE = bspinfo3
EXE = $(ODIR)/bspinfo3
all: $(EXE)
_next:
make "CFLAGS = -c -g -I../../common -DDOUBLEVEC_T" "ODIR = next"
_irix:
make "CFLAGS = -c -Ofast=ip32_10k -I../../common -Xcpluscomm -DDOUBLEVEC_T" "LDFLAGS = -Ofast=ip32_10k" "ODIR = irix"
_irixdebug:
make "CFLAGS = -c -O2 -g -I../../common -Xcpluscomm -DDOUBLEVEC_T" "LDFLAGS = -g" "ODIR = irix"
_irixinst:
make "CFLAGS = -c -Ofast=ip32_10k -I../../common -Xcpluscomm -DDOUBLEVEC_T" "LDFLAGS = -Ofast=ip32_10k" "ODIR = irix"
cp irix/$(EXEBASE) /limbo/quake2/bin_irix
_irixclean:
rm -f irix/*.o irix/$(EXEBASE)
_osf:
make "CFLAGS = -c -O4 -I../../common -threads -DDOUBLEVEC_T" "LDFLAGS = -threads" "ODIR = osf"
clean:
rm -f irix/*.o irix/$(EXEBASE)
install:
cp irix/$(EXEBASE) /limbo/quake2/bin_irix
FILES = $(ODIR)/bspinfo3.o $(ODIR)/bspfile.o $(ODIR)/cmdlib.o $(ODIR)/scriplib.o
$(EXE) : $(FILES)
cc -o $(EXE) $(LDFLAGS) $(FILES)
$(ODIR)/bspinfo3.o : bspinfo3.c
cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
cc $(CFLAGS) -o $@ /tmp/temp.i
$(ODIR)/cmdlib.o : ../../common/cmdlib.c
cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
cc $(CFLAGS) -o $@ /tmp/temp.i
$(ODIR)/scriplib.o : ../../common/scriplib.c
cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
cc $(CFLAGS) -o $@ /tmp/temp.i
$(ODIR)/bspfile.o : ../../common/bspfile.c
cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
cc $(CFLAGS) -o $@ /tmp/temp.i