support ancient toolchains
[ginge.git] / loader / Makefile
index f326814..e76d5df 100644 (file)
@@ -17,10 +17,8 @@ ifeq "$(ARCH)" "ia32"
 ARCH = ia32
 CFLAGS += -m32
 LDFLAGS += -m32
-ASFLAGS += --32
 endif
 ifeq "$(ARCH)" "arm"
-ASFLAGS += -mfloat-abi=soft
 OBJ += syscalls.o emu_arm.o
 endif
 ifdef PND
@@ -47,6 +45,7 @@ all: $(TARGET_S) $(TARGET_D)
 
 $(TARGET_S): LDFLAGS += -Wl,-T script_$(ARCH).lds
 $(TARGET_D): LDFLAGS += -ldl -Wl,--version-script=ginge_dyn.symver
+$(TARGET_D): LDFLAGS += -Wl,--no-undefined
 
 $(TARGET_S): $(OBJ_S)
        $(CC) -o $@ $^ -static $(LDFLAGS)
@@ -54,6 +53,10 @@ $(TARGET_S): $(OBJ_S)
 $(TARGET_D): $(OBJ_D)
        $(CC) -o $@ $^ -shared $(LDFLAGS)
 
+# easier to support old toolchains with this
+%.o: %.s
+       $(CC) -o $@ -c $< $(CFLAGS)
+
 clean:
        $(RM) $(TARGET_S) $(TARGET_D) $(OBJ_S) $(OBJ_D)