Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AS = gdcc-as
- CC = gdcc-cc
- LD = gdcc-ld
- SOURCEDIRECTORY = C_Source
- INCDIR = $(SOURCEDIRECTORY)/inc
- SRCDIR = $(SOURCEDIRECTORY)/src
- OBJDIR = $(SOURCEDIRECTORY)/obj
- ACSDIR = PK3_Source/acs
- all: $(OBJDIR) $(OBJDIR)/MasterExploder $(OBJDIR)/libGDCC $(OBJDIR)/libC $(ACSDIR) $(ACSDIR)/DME.bin
- cleanall:
- rm -rf $(OBJDIR) $(ACSDIR)
- cleanMasterExploder.bin:
- rm -rf $(OBJDIR)/MasterExploder $(OBJDIR)/DME.ir $(ACSDIR)
- $(OBJDIR):
- @mkdir "$(OBJDIR)"
- $(OBJDIR)/MasterExploder:
- @mkdir "$(OBJDIR)/MasterExploder"
- $(OBJDIR)/libGDCC:
- @mkdir "$(OBJDIR)/libGDCC"
- $(OBJDIR)/libC:
- @mkdir "$(OBJDIR)/libC"
- $(ACSDIR):
- @mkdir "$(ACSDIR)"
- ## ===========================================
- ##
- ## DME.bin
- ##
- ## ===========================================
- MasterExploder_INC = -i$(INCDIR)
- MasterExploder_O = \
- $(OBJDIR)/MasterExploder/main.o \
- $(OBJDIR)/MasterExploder/weapon_stuff.o \
- $(OBJDIR)/MasterExploder/misc.o
- $(MasterExploder_O) : $(OBJDIR)/MasterExploder/%.o : $(SRCDIR)/%.c
- $(CC) --warn-all --bc-target=ZDoom $(MasterExploder_INC) $< $@
- $(OBJDIR)/DME.ir: $(MasterExploder_O)
- $(LD) -co$@ $^
- $(ACSDIR)/DME.bin: $(OBJDIR)/libGDCC.ir $(OBJDIR)/libC.ir $(OBJDIR)/DME.ir
- $(LD) --bc-target=ZDoom -lDME -o$@ $^
- ## ===========================================
- ##
- ## libGDCC
- ##
- ## ===========================================
- libGDCC_IR_AS = \
- $(OBJDIR)/libGDCC/libGDCC_AddF.ir \
- $(OBJDIR)/libGDCC/libGDCC_CmpF.ir \
- $(OBJDIR)/libGDCC/libGDCC_CmpI.ir \
- $(OBJDIR)/libGDCC/libGDCC_CmpU.ir \
- $(OBJDIR)/libGDCC/libGDCC_DivF.ir \
- $(OBJDIR)/libGDCC/libGDCC_DivI.ir \
- $(OBJDIR)/libGDCC/libGDCC_DivU.ir \
- $(OBJDIR)/libGDCC/libGDCC_MulF.ir \
- $(OBJDIR)/libGDCC/libGDCC_MulU.ir \
- $(OBJDIR)/libGDCC/libGDCC_Sh.ir \
- $(OBJDIR)/libGDCC/libGDCC_SubF.ir
- libGDCC_IR_CC = \
- $(OBJDIR)/libGDCC/libGDCC_alloc.ir \
- $(OBJDIR)/libGDCC/libGDCC_format.ir
- libGDCC_IR = $(libGDCC_IR_AS) $(libGDCC_IR_CC)
- $(OBJDIR)/libGDCC.ir: $(libGDCC_IR)
- $(LD) -co$@ $^
- $(libGDCC_IR_AS) : $(OBJDIR)/libGDCC/libGDCC_%.ir :
- $(AS) --bc-target=ZDoom -o$@ --sys-source libGDCC/ZDACS/$*.asm
- $(libGDCC_IR_CC) : $(OBJDIR)/libGDCC/libGDCC_%.ir :
- $(CC) --bc-target=ZDoom -o$@ --sys-source libGDCC/$*.c
- ## ===========================================
- ##
- ## libC
- ##
- ## ===========================================
- libc_IR_AS = \
- $(OBJDIR)/libC/libc_approx.ir \
- $(OBJDIR)/libC/libc_fpclassify.ir
- libc_IR_CC = \
- $(OBJDIR)/libC/libc_ctype.ir \
- $(OBJDIR)/libC/libc_errno.ir \
- $(OBJDIR)/libC/libc_exp.ir \
- $(OBJDIR)/libC/libc_locale.ir \
- $(OBJDIR)/libC/libc_math.ir \
- $(OBJDIR)/libC/libc_printf.ir \
- $(OBJDIR)/libC/libc_round.ir \
- $(OBJDIR)/libC/libc_sort.ir \
- $(OBJDIR)/libC/libc_stdfix.ir \
- $(OBJDIR)/libC/libc_stdio.ir \
- $(OBJDIR)/libC/libc_stdlib.ir \
- $(OBJDIR)/libC/libc_string.ir \
- $(OBJDIR)/libC/libc_trig.ir
- libc_IR = $(libc_IR_AS) $(libc_IR_CC)
- $(OBJDIR)/libc.ir: $(libc_IR)
- $(LD) --bc-target=ZDoom -co$@ $^
- $(libc_IR_AS) : $(OBJDIR)/libC/libc_%.ir :
- $(AS) --bc-target=ZDoom -o$@ --sys-source libc/ZDACS/$*.asm
- $(libc_IR_CC) : $(OBJDIR)/libC/libc_%.ir :
- $(CC) --bc-target=ZDoom -o$@ --sys-source libc/$*.c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement