Skip to content

Commit

Permalink
makefile cleanup x86
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharpiro committed Sep 1, 2024
1 parent aa1317d commit a1e960e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ all: \
programs/linux/static_pie \
programs/linux/dynamic

.PHONY: echo_hi
echo_hi:
@echo hi

tinyc_sys.o: src/tiny_c/tiny_c.c
@$(CC) $(CFLAGS) \
-c \
Expand Down Expand Up @@ -133,13 +137,13 @@ programs/linux/static_pie:
@$(OBJDUMP) -D static_pie > static_pie.dump

programs/linux/dynamic:
@$(CC) \
@$(CC) $(CFLAGS) -g \
-D ARM32 \
$(WARNINGS) \
-S \
-o dynamic.s \
src/programs/linux/dynamic/dynamic_main.c
@$(CC) -g \
@$(CC) $(CFLAGS) -g \
-D ARM32 \
-nostdlib -no-pie \
$(WARNINGS) \
Expand All @@ -149,8 +153,9 @@ programs/linux/dynamic:
@$(OBJDUMP) -D dynamic > dynamic.dump

clean:
@rm -f tiny_wine loader tiny_c.o libtinyc.a libtinyc.so *.dump \
env string tinyfetch dynamic *.s
@rm -f \
*.dump *.o *.s *.a *.so \
loader env string tinyfetch dynamic unit_test static_pie

install: tiny_c tiny_c_shared
cp src/tiny_c/tiny_c.h /usr/local/include
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assert() {
}

# Unit Test
./unit_test
$PRELOADER ./unit_test
assert [ $? == 0 ]

# Env Test
Expand Down

0 comments on commit a1e960e

Please sign in to comment.