NAME=hello $(NAME).exe: $(NAME).bin link @<< $(NAME).bin /out:$(NAME).exe /fixed:no /subsystem:console /map:$(NAME).map /entry:start /stub:..\..\Bin\dpmist32.bin << pestub -q -n -w -x $(NAME).exe $(NAME).bin: $(NAME).o djgpp.ld ld -T djgpp.ld -r -s -Map $(NAME)_.map $(NAME).o crt0hx.o -lc -lgcc -o $(NAME).bin ldfix $(NAME).bin $(NAME).o: $(NAME).c makefile gcc -c -o $(NAME).o $(NAME).c |
c:\>gcc hello |
@echo off if "%1"=="" goto usage \djgpp\bin\gcc.exe -c -O %1.c -o %1.o if errorlevel 1 goto end \djgpp\bin\ld.exe -r -s -T djgpp.ld -Map %1_.map %1.o crt0hx.o -lc -lgcc -o %1.bin if errorlevel 1 goto end ..\..\Bin\ldfix %1.bin if errorlevel 1 goto end link %1.bin /nologo /subsystem:console /entry:start /out:%1.exe /fixed:no /map:%1.map if errorlevel 1 goto end ..\..\Bin\pestub -q -n -w -x %1.exe goto end :usage echo usage: gcc source_file (without .C extension) :end |