Skip to content

Commit

Permalink
make: do not read MK_ARCH & MK_CPU if already defined
Browse files Browse the repository at this point in the history
  • Loading branch information
and3rson committed Dec 2, 2023
1 parent 000c047 commit 1b149a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion elks/Makefile-rules
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,23 @@ CCDEFS = -D__KERNEL__
#########################################################################
# Set the target environment and the compiler to use.

ifndef MK_ARCH
ifeq ($(wildcard $(TOPDIR)/.config),)
MK_ARCH = ibmpc
MK_CPU = 8086
else
MK_ARCH = $(shell grep '^CONFIG_ARCH_' $(TOPDIR)/.config \
| cut -d = -f 1 | cut -d _ -f 3- | tr A-Z a-z)
endif
endif

ifndef MK_CPU
ifeq ($(wildcard $(TOPDIR)/.config),)
MK_CPU = 8086
else
MK_CPU = $(shell grep '^CONFIG_CPU_' $(TOPDIR)/.config \
| cut -d = -f 1 | cut -d _ -f 3- | tr A-Z a-z)
endif
endif

# Use GCC-IA16 compiler

Expand Down

0 comments on commit 1b149a4

Please sign in to comment.