diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-18 21:41:08 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 04ec088dfcbdf577987fe7ef93624d67e6d9c2e3 (patch) | |
| tree | 5f43345251524a5c5a4f43bddb5ff08553d76e1b /Makefile | |
| parent | ffecb8f5ae15d6713cc1bad470608ecd205a90f3 (diff) | |
Multiplatform builds!
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -11,24 +11,32 @@ STAT=pptdb BUILDROOT_DIR=buildroot-2020.11.1 -STRIP=$(BUILDROOT_DIR)/output/host/bin/arm-linux-strip -SIZE=$(BUILDROOT_DIR)/output/host/bin/arm-linux-size -CC=$(BUILDROOT_DIR)/output/host/bin/arm-linux-cc +ifeq ($(PLATFORM), pi) + STRIP=$(BUILDROOT_DIR)/output/host/bin/arm-linux-strip + SIZE=$(BUILDROOT_DIR)/output/host/bin/arm-linux-size + CC=$(BUILDROOT_DIR)/output/host/bin/arm-linux-cc +else + SIZE=size + STRIP=strip +endif %.o: %.c $(CC) -c $< -o $@ $(CFLAGS) +all: $(PROG) $(STAT) + $(PROG): src/$(PROG).o $(OBJS) $(CC) $(CFLAGS) src/$(PROG).o $(OBJS) -o $(PROG) $(STRIP) $(PROG) $(SIZE) $(PROG) +ifeq ($(PLATFORM), pi) + $(info Building the pi image) + ./do_buildroot.sh $(BUILDROOT_DIR) +endif $(STAT): src/$(STAT).o $(OBJS) $(CC) $(CFLAGS) src/$(STAT).o $(OBJS) -o $(STAT) -buildroot: $(PROG) - ./do_buildroot.sh $(BUILDROOT_DIR) - clean: rm -f $(PROG) rm -f $(STAT) |
