Skip to content

Commit

Permalink
Move rlcc from libr/egg/rlcc and shlr/mpc
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Feb 6, 2025
1 parent 36f9503 commit b03125f
Show file tree
Hide file tree
Showing 7 changed files with 4,741 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rlcc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BIN=rlcc

all:
$(CC) -o $(BIN) -Impc mpc/mpc.c rlcc.c

test:
./rlcc t/hello.r

clean:
rm -f a.out $(BIN) *.o

20 changes: 20 additions & 0 deletions rlcc/mpc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include ../../libr/config.mk
include ../../mk/platform.mk

CFLAGS+=-I.
LIBMPC=libmpc.${EXT_AR}

OFILES=mpc.o

all: ${LIBMPC}

%.o: %.c
$(CC) $(CFLAGS) $(LDFLAGS) -c $< -o $@

${LIBMPC}: $(OFILES)
rm -f $(LIBMPC)
$(AR) q $(LIBMPC) $(OFILES)
$(RANLIB) $(LIBMPC)

clean:
rm -f $(OBJS) ${LIBMPC} $(OFILES)
14 changes: 14 additions & 0 deletions rlcc/mpc/deps.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.PHONY: mpc mpc-clean clean-mpc mpc-sync sync-mpc
mpc:
$(MAKE) -C mpc all

mpc-clean clean-mpc:
$(MAKE) -C mpc clean

mpc-sync sync-mpc:
wget -O mpc/mpc.c.dos https://raw.githubusercontent.com/orangeduck/mpc/master/mpc.c
wget -O mpc/mpc.h.dos https://raw.githubusercontent.com/orangeduck/mpc/master/mpc.h
sed "s/$$(printf '\r')\$$//" < mpc/mpc.c.dos > mpc/mpc.c
sed "s/$$(printf '\r')\$$//" < mpc/mpc.h.dos > mpc/mpc.h
rm -f mpc/*.dos

Loading

0 comments on commit b03125f

Please sign in to comment.