cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

Makefile (1285B)


      1# Makefile for libc
      2
      3.EXPORT_ALL_VARIABLES:
      4
      5ifeq ($(PORTS),)
      6	PORTS = sm83 z80
      7endif
      8
      9ifeq ($(PLATFORMS),)
     10	PLATFORMS = gb ap duck gg sms msxdos
     11endif
     12
     13TOPDIR = ..
     14
     15CSRC =	atoi.c atol.c isalpha.c isdigit.c \
     16	islower.c isspace.c isupper.c \
     17	sprintf.c printf.c puts.c scanf.c strcat.c string.c \
     18	strncat.c strncmp.c strncpy.c time.c \
     19	tolower.c toupper.c \
     20	__assert.c \
     21	_modulong.c _modslong.c _divulong.c _divslong.c _mullong.c \
     22	bsearch.c qsort.c atomic_flag_clear.c \
     23	free.c malloc.c realloc.c calloc.c
     24
     25include $(TOPDIR)/Makefile.common
     26
     27all: ports platforms
     28
     29clean: port-clean ports-clean platform-clean
     30
     31ports:
     32	for i in $(PORTS); do make port THIS=$$i PORT=$$i; done
     33
     34platforms:
     35	for j in $(PORTS); do for i in $(PLATFORMS); do if [ -d "targets/$$j/$$i" ]; then make -C targets/$$j/$$i platform THIS=$$i; fi done done
     36
     37# Make all the std libs
     38# Make all the port specific libs
     39
     40# Uses the LIB <- OBJ rule from Makefile.rules
     41port: port-clean $(LIB)
     42	make -C asm/$(PORT) port
     43
     44port-clean:
     45	rm -f $(LIBC_OBJ) $(CLEANSPEC)
     46
     47ports-clean:
     48	for i in $(PORTS); do make -C asm/$$i clean THIS=$$i; done
     49
     50platform-clean:
     51	for j in $(PORTS); do for i in $(PLATFORMS); do if [ -d "targets/$$j/$$i" ]; then make -C targets/$$j/$$i clean THIS=$$i; fi done done
     52
     53include Makefile.rules