CC := gcc AS := nasm STRIP := strip RM := rm CP := cp ASFLAGS := -felf32 CFLAGS := -Wall -std=c99 -Os -static -ffunction-sections -fdata-sections -flto -fPIC -m32 -D_DEFAULT_SOURCE=1 ifeq ($(NOTASKID),y) CFLAGS += -D_NOTASKID=1 endif ifeq ($(USE_MIRAI),y) USE_PAYLOAD := mirai.x86 endif ifeq ($(DEBUG),y) CFLAGS += -g endif all: exec_crypter ifeq ($(USE_PAYLOAD),) exec_payload: exec_payload.c $(CC) $(CFLAGS) -o $@ $< ifneq ($(DEBUG),y) $(STRIP) -s \ --remove-section=.comment \ --remove-section=.eh_frame \ --remove-section=.comment \ --remove-section=.jcr \ --remove-section=.gcc_except_table \ $@ endif else exec_payload: $(USE_PAYLOAD) $(CP) -v $(USE_PAYLOAD) $@ endif include_payload.o: exec_payload include_payload.asm $(AS) $(ASFLAGS) -o $@ include_payload.asm exec_crypter.o: exec_crypter.c $(CC) $(CFLAGS) -c -o $@ $< exec_crypter: include_payload.o exec_crypter.o $(CC) $(CFLAGS) -o $@ include_payload.o exec_crypter.o ifneq ($(DEBUG),y) $(STRIP) -s \ --remove-section=.comment \ --remove-section=.eh_frame \ --remove-section=.comment \ --remove-section=.jcr \ --remove-section=.gcc_except_table \ $@ endif clean: $(RM) -f exec_payload include_payload.o exec_crypter.o exec_crypter .exec_crypter