diff options
Diffstat (limited to 'src/rules.make')
-rw-r--r-- | src/rules.make | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rules.make b/src/rules.make index 6c02313..9f4e8ce 100644 --- a/src/rules.make +++ b/src/rules.make @@ -12,11 +12,8 @@ LDFLAGS += -ffreestanding -O2 -nostdlib -lgcc all: $(OUT) -%.bin: $(OBJ) - $(LD) $(LDFLAGS) -o $@ $^ $(LIB) - -%.lib: $(OBJ) - $(LD) $(LDFLAGS) -r -o $@ $^ $(LIB) +$(OUT): $(OBJ) $(LIB) + OUT=$(OUT); $(LD) $(LDFLAGS) `if [ $${OUT##*.} = lib ]; then echo -r; fi` -o $@ $^ %.o: %.s $(AS) $(ASFLAGS) -o $@ $< |