Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 1 | CC=gcc |
| 2 | OBJS = objects/pflash/progress.o objects/pflash/ast-sf-ctrl.o |
| 3 | OBJS += objects/pflash/libflash/libflash.o objects/pflash/libflash/libffs.o |
| 4 | OBJS += objects/pflash/arm_io.o |
| 5 | LIBS=/gsa/ausgsa/home/n/j/njames/openbmc |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 6 | OFLAGS =-L$(HOME)/lib -lopenbmc_intf |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 7 | HOME = /media/sf_vbox/openbmc |
Norman James | 1e25d1d | 2015-09-15 08:20:56 -0500 | [diff] [blame] | 8 | #CFLAGS=$(shell pkg-config --libs --cflags gtk+-2.0 glib-2.0) |
| 9 | CFLAGS = -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgio-2.0 -lgobject-2.0 -lglib-2.0 |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 10 | |
| 11 | %.o: interfaces/%.c |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 12 | $(CC) -c -fPIC -o obj/$@ $< -I$(HOME) -I$(HOME)/includes $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 13 | |
| 14 | %.o: objects/%.c |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 15 | $(CC) -c -o obj/$@ $< -L$(HOME)/lib -I$(HOME) -I$(HOME)/includes -I$(HOME)/objects/pflash -lfru $(CFLAGS) |
Norman James | ddb9738 | 2015-08-27 21:31:31 -0500 | [diff] [blame] | 16 | |
| 17 | %.o: includes/%.c |
| 18 | $(CC) -c -o obj/$@ $< -I$(HOME) -I$(HOME)/includes -I$(HOME)/objects/pflash $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 19 | |
| 20 | %.o: objects/pflash/%.c |
| 21 | $(CC) -c -o obj/$@ $< -I$(HOME) -I$(HOME)/objects/pflash $(CFLAGS) |
| 22 | |
Norman James | 1e25d1d | 2015-09-15 08:20:56 -0500 | [diff] [blame] | 23 | |
| 24 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 25 | libopenbmc_intf: openbmc_intf.o |
| 26 | $(CC) -shared -o lib/$@.so obj/openbmc_intf.o $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 27 | |
Norman James | 8abb50c | 2015-09-16 10:58:16 -0500 | [diff] [blame] | 28 | power_control: power_control_obj.o gpio.o |
| 29 | $(CC) -o bin/$@.exe obj/gpio.o obj/power_control_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 30 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 31 | chassis_identify: chassis_identify_obj.o gpio.o |
| 32 | $(CC) -o bin/$@.exe obj/gpio.o obj/chassis_identify_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 33 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 34 | sensor_ambient: sensor_threshold.o sensor_temperature_ambient_obj.o |
| 35 | $(CC) -o bin/$@.exe obj/sensor_threshold.o obj/sensor_temperature_ambient_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 36 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 37 | button_power: button_power_obj.o gpio.o |
| 38 | $(CC) -o bin/$@.exe obj/button_power_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 39 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 40 | sensor_host_status: sensor_host_status_obj.o |
| 41 | $(CC) -o bin/$@.exe obj/sensor_host_status_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 42 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 43 | control_host: control_host_obj.o gpio.o |
| 44 | $(CC) -o bin/$@.exe obj/gpio.o obj/control_host_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 45 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 46 | flash_bios: pflash.o flash_bios_obj.o |
| 47 | $(CC) -o bin/$@.exe obj/flash_bios_obj.o $(OFLAGS) $(OBJS) $(CFLAGS) |
Norman James | e276510 | 2015-08-19 22:00:55 -0500 | [diff] [blame] | 48 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 49 | fan: fan_generic_obj.o gpio.o |
| 50 | $(CC) -o bin/$@.exe obj/gpio.o obj/fan_generic_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 471ab59 | 2015-08-30 22:29:40 -0500 | [diff] [blame] | 51 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 52 | host_watchdog: host_watchdog_obj.o |
| 53 | $(CC) -o bin/$@.exe obj/host_watchdog_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 471ab59 | 2015-08-30 22:29:40 -0500 | [diff] [blame] | 54 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 55 | control_bmc: control_bmc_obj.o |
| 56 | $(CC) -o bin/$@.exe obj/control_bmc_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 471ab59 | 2015-08-30 22:29:40 -0500 | [diff] [blame] | 57 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 58 | sensor_occ: sensor_occ_obj.o |
| 59 | $(CC) -o bin/$@.exe obj/sensor_occ_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 471ab59 | 2015-08-30 22:29:40 -0500 | [diff] [blame] | 60 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 61 | board_vpd: board_vpd_obj.o |
| 62 | $(CC) -o bin/$@.exe obj/board_vpd_obj.o $(OFLAGS) $(CFLAGS) |
Norman James | 1e25d1d | 2015-09-15 08:20:56 -0500 | [diff] [blame] | 63 | |
| 64 | |
| 65 | all: libopenbmc_intf power_control chassis_identify sensor_ambient button_power sensor_host_status control_host flash_bios fan host_watchdog control_bmc sensor_occ board_vpd |