From 7c5089302e5ef42c701bfced4c3723d171c0628c Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Thu, 10 Dec 2020 21:10:38 +0000 Subject: [PATCH] avra: optimize makefile git-svn-id: svn://kolibrios.org@8362 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/toolchain/avra/src/Makefile | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/contrib/toolchain/avra/src/Makefile b/contrib/toolchain/avra/src/Makefile index ce7441ccb4..13298e6821 100644 --- a/contrib/toolchain/avra/src/Makefile +++ b/contrib/toolchain/avra/src/Makefile @@ -1,3 +1,6 @@ +CC = kos32-gcc +LD = kos32-ld + SDK_DIR:= $(abspath ../../../sdk) LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0 @@ -7,14 +10,12 @@ CFLAGS = -c -fno-ident -Wall -O3 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WI INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib -CC = kos32-gcc $(CFLAGS) $(INCLUDES) -LD = kos32-ld - -SOURCES = avra.c device.c parser.c expr.c mnemonic.c directiv.c macro.c file.c map.c coff.c +SOURCES = avra.c device.c parser.c expr.c mnemonic.c directiv.c \ + macro.c file.c map.c coff.c args.c stdextra.c OBJECTS = $(SOURCES:.c=.o) -OBJ_ALL = $(OBJECTS) args.o stdextra.o +OBJ_ALL = $(OBJECTS) #******************************************************************** @@ -24,17 +25,8 @@ avra: $(OBJ_ALL) $(LD) $(OBJ_ALL) $(LDFLAGS) $(LIBPATH) -o avra -lgcc -lc.dll objcopy avra -O binary -args.o: args.c misc.h args.h -avra.o: avra.c misc.h args.h avra.h device.h -device.o: device.c misc.h avra.h device.h -directiv.o: directiv.c misc.h args.h avra.h device.h -expr.o: expr.c misc.h avra.h -file.o: file.c misc.h avra.h -macro.o: macro.c misc.h args.h avra.h -mnemonic.o: mnemonic.c misc.h avra.h device.h -parser.o: parser.c misc.h avra.h -stdextra.o: stdextra.c misc.h -coff.o: coff.c coff.h +%.o : %.c Makefile + $(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $< clean: rm -f avra *.o *.p *~