uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

mkfile (1498B)


      1 </$objtype/mkfile
      2 
      3 BIN=/$objtype/bin/games
      4 TARG=bin/uxncli bin/uxnasm bin/uxnemu
      5 USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal | grep -v /assets/ | grep -v /library/}
      6 ROM=${USM:%.tal=%.rom}
      7 CFLAGS=$CFLAGS -p -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2
      8 HFILES=\
      9 	/sys/include/npe/stdio.h\
     10 	src/devices/audio.h\
     11 	src/devices/controller.h\
     12 	src/devices/datetime.h\
     13 	src/devices/file.h\
     14 	src/devices/mouse.h\
     15 	src/devices/screen.h\
     16 	src/devices/system.h\
     17 	src/devices/console.h\
     18 	src/uxn.h\
     19 
     20 CLEANFILES=$TARG $ROM
     21 
     22 default:V: all
     23 
     24 all:V: bin $TARG $ROM
     25 
     26 bin:
     27 	mkdir -p bin
     28 
     29 /sys/include/npe/stdio.h:
     30 	hget https://git.sr.ht/~ft/npe/archive/master.tar.gz | tar xz &&
     31 	cd npe-master &&
     32 	mk install &&
     33 	rm -r npe-master
     34 
     35 %.rom:Q: %.tal bin/uxnasm
     36 	bin/uxnasm $stem.tal $target >/dev/null
     37 
     38 bin/uxncli: file.$O datetime.$O system.$O console.$O uxncli.$O uxn.$O
     39 	$LD $LDFLAGS -o $target $prereq
     40 
     41 bin/uxnasm: uxnasm.$O
     42 	$LD $LDFLAGS -o $target $prereq
     43 
     44 bin/uxnemu: audio.$O controller.$O datetime.$O file.$O mouse.$O screen.$O system.$O console.$O uxn.$O uxnemu.$O
     45 	$LD $LDFLAGS -o $target $prereq
     46 
     47 (uxnasm|uxncli|uxnemu|uxn)\.$O:R: src/\1.c
     48 	$CC $CFLAGS -Isrc -o $target src/$stem1.c
     49 
     50 (audio|controller|datetime|file|mouse|screen|system|console)\.$O:R: src/devices/\1.c
     51 	$CC $CFLAGS -Isrc -o $target src/devices/$stem1.c
     52 
     53 nuke:V: clean
     54 
     55 clean:V:
     56 	rm -f *.[$OS] [$OS].??* $TARG $CLEANFILES
     57 
     58 %.clean:V:
     59 	rm -f $stem.[$OS] [$OS].$stem $stem
     60 
     61 install:V: all
     62 	cp $TARG $BIN/
     63 
     64 #LDFLAGS=-p