Skip to content

Commit

Permalink
re-enable -O2 for au_base.c; update makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
crazii committed Feb 18, 2024
1 parent 9df2add commit db71b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
31 changes: 0 additions & 31 deletions makefile
Expand Up @@ -7,12 +7,6 @@ VERSION ?= $(shell git describe --tags)

INCLUDES := -I./mpxplay -I./sbemu
DEFINES := -D__DOS__ -DSBEMU -DDEBUG=$(DEBUG) -DMAIN_SBEMU_VER=\"$(VERSION)\"
#CFLAGS := -fcommon -march=i386 -Os -flto -Wno-attributes $(INCLUDES) $(DEFINES)
AU_BASE_CFLAGS := -fcommon -march=i386 -Os -flto $(INCLUDES) $(DEFINES)
AU_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES)
SC_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES)
MPXPLAY_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES)
SBEMU_CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES)
CFLAGS := -fcommon -march=i386 -O2 -flto $(INCLUDES) $(DEFINES)
LDFLAGS := -lstdc++ -lm -Wno-attributes

Expand Down Expand Up @@ -80,31 +74,6 @@ $(TARGET): $(OBJS)
$(SILENTMSG) "LINK\t$@\n"
$(SILENTCMD)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

output/mpxplay/au_cards/sc_%.o: mpxplay/au_cards/sc_%.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
$(SILENTCMD)$(CC) $(SC_CFLAGS) -c $< -o $@

output/mpxplay/au_cards/au_base.o: mpxplay/au_cards/au_base.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
$(CC) $(AU_BASE_CFLAGS) -c $< -o $@

output/mpxplay/au_cards/au_%.o: mpxplay/au_cards/au_%.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
$(SILENTCMD)$(CC) $(AU_CFLAGS) -c $< -o $@

output/mpxplay/%.o: mpxplay/%.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
$(SILENTCMD)$(CC) $(MPXPLAY_CFLAGS) -c $< -o $@

output/sbemu/%.o: sbemu/%.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
$(SILENTCMD)$(CC) $(SBEMU_CFLAGS) -c $< -o $@

output/%.o: %.c
@mkdir -p $(dir $@)
$(SILENTMSG) "CC\t$@\n"
Expand Down
2 changes: 2 additions & 0 deletions mpxplay/au_cards/au_base.c
Expand Up @@ -195,9 +195,11 @@ unsigned long pds_dpmi_map_physical_memory(unsigned long phys_addr,unsigned long
physicalmaps[i] = info;
unsigned long newlimit = info.address + memsize - 1;
newlimit = ((newlimit+1+0xFFF)&~0xFFF)-1;//__dpmi_set_segment_limit need page aligned
int intr = disable();
__dpmi_set_segment_limit(_my_ds(), max(limit, newlimit));
__dpmi_set_segment_limit(__djgpp_ds_alias, max(limit, newlimit));
__djgpp_selector_limit = max(limit, newlimit);
if (intr) enable();
return info.address;
}
return 0;
Expand Down

0 comments on commit db71b27

Please sign in to comment.